// Given the dependency file is in a parent directory of the directory the
//     command is run in
// When the command is run
// Then dependencies are pulled to the correct locations relative to the
//     dependency file
Given the dependency file is in a parent directory of the directory the
command is run in
When the command is run
Then dependencies are pulled to the correct locations relative to the
dependency file
Given the dependency file is in a parent directory of the directory the command is run in When the command is run Then dependencies are pulled to the correct locations relative to the dependency file
fn run_in_proj_subdir() {
    let test_deps = test_deps();
    let Layout{dep_srcs_dir, proj_dir, deps_file_conts, ..} =
        test_setup::create(
            "run_in_proj_subdir",
            &test_deps,
            &hashmap!{"my_scripts" => 1},
        );
    let test_subdir = test_setup::create_dir(proj_dir.clone(), "sub");
    let cmd_result = test_setup::with_git_server(
        dep_srcs_dir,
        || {
            let mut cmd = test_setup::new_test_cmd(test_subdir);
            cmd.assert()
        },
    );
    cmd_result.code(0).stdout("").stderr("");
    fs_check::assert_contents(
        &proj_dir,
        &Node::Dir(hashmap!{
            "dpnd.txt" => Node::File(&deps_file_conts),
            "sub" => Node::Dir(hashmap!{}),
            "deps" => Node::Dir(hashmap!{
                "current_dpnd.txt" => Node::AnyFile,
                "my_scripts" => Node::Dir(hashmap!{
                    ".git" => Node::AnyDir,
                    "script.sh" => Node::File("echo 'hello, world!'"),
                }),
            }),
        }),
    );
}
fn run_in_proj_subdir ( ) { let test_deps = test_deps ( ) ; let Layout { dep_srcs_dir , proj_dir , deps_file_conts , .. } = test_setup :: create ( " " , & test_deps , & hashmap ! { " " 1 } , ) ; let test_subdir = test_setup :: create_dir ( proj_dir . clone ( ) , " " ) ; let cmd_result = test_setup :: with_git_server ( dep_srcs_dir , | | { let mut cmd = test_setup :: new_test_cmd ( test_subdir ) ; cmd . assert ( ) } , ) ; cmd_result . code ( 0 ) . stdout ( " " ) . stderr ( " " ) ; fs_check :: assert_contents ( & proj_dir , & Node :: Dir ( hashmap ! { " " Node File ( deps_file_conts ) " " Node Dir ( hashmap { } ) " " Node Dir ( hashmap { " " Node AnyFile " " Node Dir ( hashmap { " " Node AnyDir " " Node File ( " " ) } ) } ) } ) , ) ; }
Given the dependency file is in a parent directory of the directory the
command is run in
When the command is run
Then dependencies are pulled to the correct locations relative to the
dependency file
Given the dependency file is in a parent directory of the directory the command is run in When the command is run Then dependencies are pulled to the correct locations relative to the dependency file