forked from extern/nushell
Finish last few types and add tests
This commit is contained in:
@ -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!(
|
||||
|
Reference in New Issue
Block a user