2014-12-17 21:11:56 +13:00
|
|
|
#![feature(phase)]
|
|
|
|
|
2014-12-18 19:49:49 +13:00
|
|
|
extern crate maud;
|
|
|
|
#[phase(plugin)] extern crate maud_macros;
|
2014-12-17 21:11:56 +13:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn it_works() {
|
2014-12-18 18:57:55 +13:00
|
|
|
html! test_template("du\tcks" -23 3.14 '\n' "geese");
|
2014-12-19 11:53:40 +13:00
|
|
|
let s = maud::render(test_template);
|
2014-12-18 18:57:55 +13:00
|
|
|
assert_eq!(&*s, "du\tcks-233.14\ngeese");
|
2014-12-17 21:11:56 +13:00
|
|
|
}
|
2014-12-19 11:53:40 +13:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn escaping() {
|
|
|
|
html! template("<flim&flam>");
|
|
|
|
let s = maud::render(template);
|
|
|
|
assert_eq!(&*s, "<flim&flam>");
|
|
|
|
}
|