1
0
Fork 0
mirror of https://github.com/lise-henry/crowbook synced 2024-05-24 01:46:04 +02:00
crowbook/tests/book.rs
2019-03-05 11:16:16 +01:00

21 lines
601 B
Rust

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();
}