1
0
mirror of https://github.com/lise-henry/crowbook synced 2024-11-18 00:13:55 +01:00
crowbook/tests/book.rs

18 lines
582 B
Rust
Raw Normal View History

extern crate crowbook;
use crowbook::{Book, InfoLevel};
2016-02-26 18:51:13 +01:00
use std::io;
#[test]
fn test_book() {
let book = Book::new_from_file(&format!("{}/{}", env!("CARGO_MANIFEST_DIR"), "tests/test.book"), InfoLevel::Error, &[]).unwrap();
2016-02-26 18:51:13 +01:00
book.render_html(&mut io::sink()).unwrap();
book.render_tex(&mut io::sink()).unwrap();
}
#[test]
fn book_example() {
let book = Book::new_from_file(&format!("{}/{}", env!("CARGO_MANIFEST_DIR"), "config.book"), InfoLevel::Error, &[]).unwrap();
2016-02-26 18:51:13 +01:00
book.render_html(&mut io::sink()).unwrap();
book.render_tex(&mut io::sink()).unwrap();
}