Skip to content

Commit 153bbe8

Browse files
Add test for init with --ignore none passed
1 parent 5e60435 commit 153bbe8

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/testsuite/init.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,3 +273,18 @@ book
273273
);
274274
assert!(test.dir.join(".gitignore").exists());
275275
}
276+
277+
/// Run `mdbook init` with explicit `--ignore none` to not create a `.gitignore` file
278+
#[test]
279+
fn init_with_ignore_none() {
280+
let mut test = BookTest::empty();
281+
test.run("init --ignore none", |cmd| {
282+
cmd.expect_stdout(str![[r#"
283+
What title would you like to give the book?
284+
285+
All done, no errors...
286+
287+
"#]]);
288+
});
289+
assert!(!test.dir.join(".gitignore").exists());
290+
}

0 commit comments

Comments
 (0)