Debian Codegraph @

examples/remove-emphasis/test.rs

raw
1 //! A test to ensure that the remove-emphasis example works.
2
3 #[test]
4 fn remove_emphasis_works() {
5 // Tests that the remove-emphasis example works as expected.
6
7 // Workaround for https://github.com/rust-lang/mdBook/issues/1424
8 std::env::set_current_dir("examples/remove-emphasis").unwrap();
9 let book = mdbook_driver::MDBook::load(".").unwrap();
10 book.build().unwrap();
11 let ch1 = std::fs::read_to_string("book/chapter_1.html").unwrap();
12 assert!(ch1.contains("This has light emphasis and bold emphasis."));
13 }