1
0
Fork 0
mirror of https://github.com/lise-henry/crowbook synced 2024-05-26 07:56:09 +02:00
crowbook/tests/book.rs
Elisabeth Henry c99b3a261b Fix tests
2017-10-04 14:43:38 +02:00

22 lines
624 B
Rust

extern crate crowbook;
use crowbook::Book;
use std::io;
#[test]
fn test_book() {
let mut book = Book::new();
book.load_file(&format!("{}/{}", env!("CARGO_MANIFEST_DIR"), "tests/test.book"))
.unwrap();
book.render_format_to("html", &mut io::sink()).unwrap();
book.render_format_to("tex", &mut io::sink()).unwrap();
}
#[test]
fn book_example() {
let mut book = Book::new();
book.load_file(&format!("{}/{}", env!("CARGO_MANIFEST_DIR"), "guide.book"))
.unwrap();
book.render_format_to("html", &mut io::sink()).unwrap();
book.render_format_to("tex", &mut io::sink()).unwrap();
}