Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add test for init with --ignore none passed
  • Loading branch information
krishanjmistry committed May 28, 2025
commit 153bbe8abbff799b54a1b7b1383463f482e350f3
15 changes: 15 additions & 0 deletions tests/testsuite/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,3 +273,18 @@ book
);
assert!(test.dir.join(".gitignore").exists());
}

/// Run `mdbook init` with explicit `--ignore none` to not create a `.gitignore` file
#[test]
fn init_with_ignore_none() {
let mut test = BookTest::empty();
test.run("init --ignore none", |cmd| {
cmd.expect_stdout(str![[r#"
What title would you like to give the book?

All done, no errors...

"#]]);
});
assert!(!test.dir.join(".gitignore").exists());
}