1
0
Fork 0
mirror of https://github.com/lise-henry/crowbook synced 2024-05-26 03:46:19 +02:00

Fix tests

This commit is contained in:
Elisabeth Henry 2017-10-04 14:43:38 +02:00
parent 24e19cc84c
commit c99b3a261b

View File

@ -1,12 +1,11 @@
extern crate crowbook; extern crate crowbook;
use crowbook::{Book, InfoLevel}; use crowbook::Book;
use std::io; use std::io;
#[test] #[test]
fn test_book() { fn test_book() {
let mut book = Book::new(); let mut book = Book::new();
book.set_verbosity(InfoLevel::Error) book.load_file(&format!("{}/{}", env!("CARGO_MANIFEST_DIR"), "tests/test.book"))
.load_file(&format!("{}/{}", env!("CARGO_MANIFEST_DIR"), "tests/test.book"))
.unwrap(); .unwrap();
book.render_format_to("html", &mut io::sink()).unwrap(); book.render_format_to("html", &mut io::sink()).unwrap();
book.render_format_to("tex", &mut io::sink()).unwrap(); book.render_format_to("tex", &mut io::sink()).unwrap();
@ -15,8 +14,7 @@ fn test_book() {
#[test] #[test]
fn book_example() { fn book_example() {
let mut book = Book::new(); let mut book = Book::new();
book.set_verbosity(InfoLevel::Error) book.load_file(&format!("{}/{}", env!("CARGO_MANIFEST_DIR"), "guide.book"))
.load_file(&format!("{}/{}", env!("CARGO_MANIFEST_DIR"), "guide.book"))
.unwrap(); .unwrap();
book.render_format_to("html", &mut io::sink()).unwrap(); book.render_format_to("html", &mut io::sink()).unwrap();
book.render_format_to("tex", &mut io::sink()).unwrap(); book.render_format_to("tex", &mut io::sink()).unwrap();