Skip to content

Commit

Permalink
Add missing --init test (#543)
Browse files Browse the repository at this point in the history
  • Loading branch information
casey authored Nov 20, 2019
1 parent e948f11 commit d157c87
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
fn alternate_marker() {
let tmp = tmptree! {
Expand Down

0 comments on commit d157c87

Please sign in to comment.