mirror of
https://github.com/lise-henry/crowbook
synced 2024-05-28 05:46:23 +02:00
22 lines
624 B
Rust
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();
|
|
}
|