mirror of
https://github.com/nushell/nushell.git
synced 2025-08-18 09:19:53 +02:00
Add markdown output (#1503)
This commit is contained in:
25
crates/nu-cli/tests/format_conversions/markdown.rs
Normal file
25
crates/nu-cli/tests/format_conversions/markdown.rs
Normal file
@@ -0,0 +1,25 @@
|
||||
use nu_test_support::{nu, pipeline};
|
||||
|
||||
#[test]
|
||||
fn out_md_simple() {
|
||||
let actual = nu!(
|
||||
cwd: ".", pipeline(
|
||||
r#"
|
||||
echo 3 | to-md
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual, "3");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn out_md_table() {
|
||||
let actual = nu!(
|
||||
cwd: ".", pipeline(
|
||||
r#"
|
||||
echo '{"name": "jason"}' | from-json | to-md
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual, "|name||-||jason|");
|
||||
}
|
Reference in New Issue
Block a user