mirror of
https://github.com/lise-henry/crowbook
synced 2024-11-18 00:13:55 +01:00
18 lines
572 B
Rust
18 lines
572 B
Rust
extern crate crowbook;
|
|
use crowbook::{Book, InfoLevel};
|
|
use std::io;
|
|
|
|
#[test]
|
|
fn test_book() {
|
|
let book = Book::new_from_file(&format!("{}/{}", env!("CARGO_MANIFEST_DIR"), "tests/test.book"), InfoLevel::Error).unwrap();
|
|
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();
|
|
book.render_html(&mut io::sink()).unwrap();
|
|
book.render_tex(&mut io::sink()).unwrap();
|
|
}
|