Command tests (#922)

* WIP command tests

* Finish marking todo tests

* update

* update

* Windows cd test ignoring
This commit is contained in:
JT
2022-02-03 21:01:45 -05:00
committed by GitHub
parent ac0b331f00
commit a008f1aa80
139 changed files with 10298 additions and 348 deletions

View File

@ -0,0 +1,35 @@
use nu_test_support::{nu, pipeline};
// FIXME: jt: needs more work
#[ignore]
#[test]
fn headers_uses_first_row_as_header() {
let actual = nu!(
cwd: "tests/fixtures/formats", pipeline(
r#"
open sample_headers.xlsx
| get Sheet1
| headers
| get header0
| from json"#
));
assert_eq!(actual.out, "r1c0r2c0")
}
// FIXME: jt: needs more work
#[ignore]
#[test]
fn headers_adds_missing_column_name() {
let actual = nu!(
cwd: "tests/fixtures/formats", pipeline(
r#"
open sample_headers.xlsx
| get Sheet1
| headers
| get Column1
| from json"#
));
assert_eq!(actual.out, "r1c1r2c1")
}