mirror of
https://github.com/lise-henry/crowbook
synced 2024-09-28 15:21:33 +02:00
Fix tests
This commit is contained in:
parent
24e19cc84c
commit
c99b3a261b
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user