Add simple to-html output and bump version (#1487)

This commit is contained in:
Jonathan Turner
2020-03-15 16:04:44 +13:00
committed by GitHub
parent b6363f3ce1
commit 2d078849cb
8 changed files with 145 additions and 4 deletions

View File

@ -0,0 +1,28 @@
use nu_test_support::{nu, pipeline};
#[test]
fn out_html_simple() {
let actual = nu!(
cwd: ".", pipeline(
r#"
echo 3 | to-html
"#
));
assert_eq!(actual, "<html><body>3</body></html>");
}
#[test]
fn out_html_table() {
let actual = nu!(
cwd: ".", pipeline(
r#"
echo '{"name": "jason"}' | from-json | to-html
"#
));
assert_eq!(
actual,
"<html><body><table><tr><th>name</th></tr><tr><td>jason</td></tr></table></body></html>"
);
}

View File

@ -1,5 +1,6 @@
mod bson;
mod csv;
mod html;
mod json;
mod ods;
mod sqlite;