2020-03-19 20:18:24 +01:00
|
|
|
use nu_test_support::{nu, pipeline};
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn out_md_simple() {
|
|
|
|
let actual = nu!(
|
|
|
|
cwd: ".", pipeline(
|
|
|
|
r#"
|
2020-05-04 10:44:33 +02:00
|
|
|
echo 3 | to md
|
2020-03-19 20:18:24 +01:00
|
|
|
"#
|
|
|
|
));
|
|
|
|
|
2020-05-07 13:03:43 +02:00
|
|
|
assert_eq!(actual.out, "3");
|
2020-03-19 20:18:24 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn out_md_table() {
|
|
|
|
let actual = nu!(
|
|
|
|
cwd: ".", pipeline(
|
|
|
|
r#"
|
2020-05-04 10:44:33 +02:00
|
|
|
echo '{"name": "jason"}' | from json | to md
|
2020-03-19 20:18:24 +01:00
|
|
|
"#
|
|
|
|
));
|
|
|
|
|
2020-05-07 13:03:43 +02:00
|
|
|
assert_eq!(actual.out, "|name||-||jason|");
|
2020-03-19 20:18:24 +01:00
|
|
|
}
|