fn unavailable_git_proj_vsn() {
    let root_test_dir =
        test_setup::create_root_dir("unavailable_git_proj_vsn");
    let dep_dir =
        test_setup::create_dir(root_test_dir.clone(), "my_scripts.git");
    let scratch_dir = test_setup::create_dir(root_test_dir.clone(), "scratch");
    test_setup::create_bare_git_repo(
        &dep_dir,
        &scratch_dir,
        &[
            hashmap!{"script.sh" => "echo 'hello, world!'"},
        ],
    );
    let test_proj_dir = test_setup::create_dir(root_test_dir.clone(), "proj");
    let deps_file_conts = indoc!{"
        deps

        my_scripts git git://localhost/my_scripts.git bad_commit
    "};
    let cmd_result = test_setup::with_git_server(
        root_test_dir,
        || {
            fs::write(
                test_proj_dir.to_string() + "/dpnd.txt",
                &deps_file_conts,
            )
                .expect("couldn't write dependency file");
            let mut cmd = test_setup::new_test_cmd(test_proj_dir.clone());

            cmd.assert()
        },
    );

    cmd_result
        .code(1)
        .stdout("")
        .stderr(indoc!{"
            Couldn't change the version for the 'my_scripts' dependency: `git \
             checkout bad_commit` failed with the following output:

            [!] error: pathspec 'bad_commit' did not match any file(s) known \
             to git

        "});
}
// Given the dependency file specifies a Git version that is unavailable
// When the command is run
// Then the command fails with the output of the Git command
Given the dependency file specifies a Git version that is unavailable
When the command is run
Then the command fails with the output of the Git command
Given the dependency file specifies a Git version that is unavailable When the command is run Then the command fails with the output of the Git command
fn unavailable_git_proj_vsn() {
    let root_test_dir =
        test_setup::create_root_dir("unavailable_git_proj_vsn");
    let dep_dir =
        test_setup::create_dir(root_test_dir.clone(), "my_scripts.git");
    let scratch_dir = test_setup::create_dir(root_test_dir.clone(), "scratch");
    test_setup::create_bare_git_repo(
        &dep_dir,
        &scratch_dir,
        &[
            hashmap!{"script.sh" => "echo 'hello, world!'"},
        ],
    );
    let test_proj_dir = test_setup::create_dir(root_test_dir.clone(), "proj");
    let deps_file_conts = indoc!{"
        deps
        my_scripts git git://localhost/my_scripts.git bad_commit
    "};
    let cmd_result = test_setup::with_git_server(
        root_test_dir,
        || {
            fs::write(
                test_proj_dir.to_string() + "/dpnd.txt",
                &deps_file_conts,
            )
                .expect("couldn't write dependency file");
            let mut cmd = test_setup::new_test_cmd(test_proj_dir.clone());
            cmd.assert()
        },
    );
    cmd_result
        .code(1)
        .stdout("")
        .stderr(indoc!{"
            Couldn't change the version for the 'my_scripts' dependency: `git \
             checkout bad_commit` failed with the following output:
            [!] error: pathspec 'bad_commit' did not match any file(s) known \
             to git
        "});
}
fn unavailable_git_proj_vsn ( ) { let root_test_dir = test_setup :: create_root_dir ( " " ) ; let dep_dir = test_setup :: create_dir ( root_test_dir . clone ( ) , " " ) ; let scratch_dir = test_setup :: create_dir ( root_test_dir . clone ( ) , " " ) ; test_setup :: create_bare_git_repo ( & dep_dir , & scratch_dir , & [ hashmap ! { " " " " } , ] , ) ; let test_proj_dir = test_setup :: create_dir ( root_test_dir . clone ( ) , " " ) ; let deps_file_conts = indoc ! { " " } ; let cmd_result = test_setup :: with_git_server ( root_test_dir , | | { fs :: write ( test_proj_dir . to_string ( ) + " " , & deps_file_conts , ) . expect ( " " ) ; let mut cmd = test_setup :: new_test_cmd ( test_proj_dir . clone ( ) ) ; cmd . assert ( ) } , ) ; cmd_result . code ( 1 ) . stdout ( " " ) . stderr ( indoc ! { " \
 \
 " } ) ; }
Given the dependency file specifies a Git version that is unavailable
When the command is run
Then the command fails with the output of the Git command
Given the dependency file specifies a Git version that is unavailable When the command is run Then the command fails with the output of the Git command