File: test.rs

package info (click to toggle)
mdbook 0.4.48%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 2,080 kB
  • sloc: javascript: 1,066; sh: 75; python: 28; makefile: 24
file content (13 lines) | stat: -rw-r--r-- 478 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
use mdbook::MDBook;

#[test]
fn remove_emphasis_works() {
    // Tests that the remove-emphasis example works as expected.

    // Workaround for https://github.com/rust-lang/mdBook/issues/1424
    std::env::set_current_dir("examples/remove-emphasis").unwrap();
    let book = MDBook::load(".").unwrap();
    book.build().unwrap();
    let ch1 = std::fs::read_to_string("book/chapter_1.html").unwrap();
    assert!(ch1.contains("This has light emphasis and bold emphasis."));
}