Finish last few types and add tests

This commit is contained in:
Patrick Meredith
2019-08-25 03:42:32 -04:00
parent 722e192c14
commit a3b4d47b4e
3 changed files with 88 additions and 4 deletions

View File

@ -24,6 +24,50 @@ fn open_can_parse_csv() {
assert_eq!(output, "SPAIN");
}
#[test]
fn open_can_parse_bson_1() {
nu!(
output,
cwd("tests/fixtures/formats"),
"open sample.bson | nth 3 | get b | get '$javascript' | echo $it"
);
assert_eq!(output, "let x = y");
}
#[test]
fn open_can_parse_bson_2() {
nu!(
output,
cwd("tests/fixtures/formats"),
"open sample.bson | nth 0 | get b | echo $it"
);
assert_eq!(output, "hello");
}
#[test]
fn open_can_parse_bson_3() {
nu!(
output,
cwd("tests/fixtures/formats"),
"open sample.bson | nth 0 | get b | echo $it"
);
assert_eq!(output, "hello");
}
#[test]
fn open_can_parse_bson_4() {
nu!(
output,
cwd("tests/fixtures/formats"),
"open sample.bson | nth 6 | get b | get '$binary_subtype' | echo $it "
);
assert_eq!(output, "function");
}
#[test]
fn open_can_parse_toml() {
nu!(