More nuon tests, fix table print (#4762)

This commit is contained in:
JT
2022-03-07 08:39:02 -05:00
committed by GitHub
parent 4f43d75130
commit 0b6b321ad6
3 changed files with 58 additions and 0 deletions

View File

@ -126,3 +126,39 @@ fn binary_roundtrip() {
assert_eq!(actual.out, "0x[1FFF]");
}
#[test]
fn read_binary_data() {
let actual = nu!(
cwd: "tests/fixtures/formats", pipeline(
r#"
open sample.nuon | get 5.3
"#
));
assert_eq!(actual.out, "31")
}
#[test]
fn read_record() {
let actual = nu!(
cwd: "tests/fixtures/formats", pipeline(
r#"
open sample.nuon | get 4.name
"#
));
assert_eq!(actual.out, "Bobby")
}
#[test]
fn read_bool() {
let actual = nu!(
cwd: "tests/fixtures/formats", pipeline(
r#"
open sample.nuon | get 3 | $in == $true
"#
));
assert_eq!(actual.out, "true")
}