2016-02-26 17:33:33 +01:00
|
|
|
extern crate crowbook;
|
2016-02-29 01:12:29 +01:00
|
|
|
use crowbook::{Book, InfoLevel};
|
2016-02-26 18:51:13 +01:00
|
|
|
use std::io;
|
2016-02-26 17:33:33 +01:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn test_book() {
|
2016-02-29 01:12:29 +01:00
|
|
|
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();
|
2016-02-26 17:33:33 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn book_example() {
|
2016-02-29 01:12:29 +01:00
|
|
|
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();
|
2016-02-26 17:33:33 +01:00
|
|
|
}
|