diff --git a/crates/nu-command/tests/commands/drop.rs b/crates/nu-command/tests/commands/drop.rs index 76e908ce82..e12fe3696b 100644 --- a/crates/nu-command/tests/commands/drop.rs +++ b/crates/nu-command/tests/commands/drop.rs @@ -1,21 +1,15 @@ use nu_test_support::{nu, pipeline}; -// FIXME: jt: needs more work -#[ignore] #[test] fn columns() { let actual = nu!( cwd: ".", pipeline(r#" echo [ [arepas, color]; - [3, white] [8, yellow] [4, white] - ] - | drop column - | get - | length + ] | drop column | columns | length "#) ); @@ -30,14 +24,10 @@ fn more_columns_than_table_has() { cwd: ".", pipeline(r#" echo [ [arepas, color]; - [3, white] [8, yellow] [4, white] - ] - | drop column 3 - | get - | empty? + ] | drop column 3 | columns | empty? "#) ); diff --git a/crates/nu-command/tests/commands/get.rs b/crates/nu-command/tests/commands/get.rs index 14c6dc1b36..09aafeb3fc 100644 --- a/crates/nu-command/tests/commands/get.rs +++ b/crates/nu-command/tests/commands/get.rs @@ -49,6 +49,7 @@ fn fetches_by_index() { assert_eq!(actual.out, "Andrés N. Robalino "); }) } + #[test] fn fetches_by_column_path() { Playground::setup("get_test_3", |dirs, sandbox| { @@ -130,8 +131,6 @@ fn fetches_more_than_one_column_path() { }) } -// FIXME: jt: needs more work -#[ignore] #[test] fn errors_fetching_by_column_not_present() { Playground::setup("get_test_6", |dirs, sandbox| { @@ -153,17 +152,11 @@ fn errors_fetching_by_column_not_present() { "# )); - assert!(actual.err.contains("Unknown column"),); - assert!(actual.err.contains("There isn't a column named 'taco'"),); - assert!(actual.err.contains("Perhaps you meant 'taconushell'?"),); - assert!(actual - .err - .contains("Columns available: pizzanushell, taconushell"),); + assert!(actual.err.contains("Name not found"),); + assert!(actual.err.contains("did you mean 'taconushell'"),); }) } -// FIXME: jt: needs more work -#[ignore] #[test] fn errors_fetching_by_column_using_a_number() { Playground::setup("get_test_7", |dirs, sandbox| { @@ -183,16 +176,15 @@ fn errors_fetching_by_column_using_a_number() { "# )); - assert!(actual.err.contains("No rows available"),); - assert!(actual.err.contains("A row at '0' can't be indexed."),); assert!(actual .err - .contains("Appears to contain columns. Columns available: 0"),) + .contains("Data cannot be accessed with a cell path"),); + assert!(actual + .err + .contains(" record<0: string> doesn't support cell paths"),); }) } -// FIXME: jt: needs more work -#[ignore] #[test] fn errors_fetching_by_index_out_of_bounds() { Playground::setup("get_test_8", |dirs, sandbox| { @@ -212,9 +204,8 @@ fn errors_fetching_by_index_out_of_bounds() { "# )); - assert!(actual.err.contains("Row not found"),); - assert!(actual.err.contains("There isn't a row indexed at 3"),); - assert!(actual.err.contains("The table only has 3 rows (0 to 2)"),) + assert!(actual.err.contains("Row number too large (max: 3)"),); + assert!(actual.err.contains("too large"),); }) } diff --git a/crates/nu-command/tests/commands/hash_/mod.rs b/crates/nu-command/tests/commands/hash_/mod.rs index bd8a53bcfd..54eede3d38 100644 --- a/crates/nu-command/tests/commands/hash_/mod.rs +++ b/crates/nu-command/tests/commands/hash_/mod.rs @@ -5,7 +5,7 @@ fn base64_defaults_to_encoding_with_standard_character_type() { let actual = nu!( cwd: ".", pipeline( r#" - echo 'username:password' | hash base64 + echo 'username:password' | hash base64 "# ) ); @@ -88,14 +88,12 @@ fn error_use_both_flags() { .contains("only one of --decode and --encode flags can be used")); } -// FIXME: jt: needs more work -#[ignore] #[test] fn md5_works_with_file() { let actual = nu!( cwd: "tests/fixtures/formats", pipeline( r#" - open sample.db | hash md5 + open sample.db | hash md5 "# ) ); @@ -103,8 +101,6 @@ fn md5_works_with_file() { assert_eq!(actual.out, "4de97601d232c427977ef11db396c951"); } -// FIXME: jt: needs more work -#[ignore] #[test] fn sha256_works_with_file() { let actual = nu!(