Add missing --init test (#543)

This commit is contained in:
Casey Rodarmor 2019-11-20 01:35:29 -06:00 committed by GitHub
parent e948f11784
commit d157c87460
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,6 +65,27 @@ fn invocation_directory() {
); );
} }
#[test]
fn parent_dir() {
let tmp = tmptree! {
".git": {},
sub: {},
};
let output = Command::new(executable_path("just"))
.current_dir(tmp.path().join("sub"))
.arg("--init")
.output()
.unwrap();
assert!(output.status.success());
assert_eq!(
fs::read_to_string(tmp.path().join("justfile")).unwrap(),
EXPECTED
);
}
#[test] #[test]
fn alternate_marker() { fn alternate_marker() {
let tmp = tmptree! { let tmp = tmptree! {