Add to xml command (#2141) (#2155)

This commit is contained in:
Warren Seine
2020-07-24 09:41:22 +02:00
committed by GitHub
parent 2d3b1e090a
commit 55a2f284d9
10 changed files with 328 additions and 1 deletions

View File

@ -13,4 +13,5 @@ mod tsv;
mod url;
mod vcf;
mod xlsx;
mod xml;
mod yaml;

View File

@ -0,0 +1,17 @@
use nu_test_support::{nu, pipeline};
#[test]
fn table_to_xml_text_and_from_xml_text_back_into_table() {
let actual = nu!(
cwd: "tests/fixtures/formats", pipeline(
r#"
open jonathan.xml
| to xml
| from xml
| get rss.children.channel.children.0.item.children.0.guid.attributes.isPermaLink
| echo $it
"#
));
assert_eq!(actual.out, "true");
}