From 61455b457d919a5e55c2fa10c43bf70c0cdb1a0c Mon Sep 17 00:00:00 2001 From: JT <547158+jntrnr@users.noreply.github.com> Date: Wed, 15 Mar 2023 18:54:55 +1300 Subject: [PATCH] Fix warnings and old names (#8457) # Description This fixes up some clippy warnings and removes some old names/info from our unit tests # User-Facing Changes Internal changes only # Tests + Formatting Don't forget to add tests that cover your changes. Make sure you've run and fixed any issues with these commands: - `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect` to check that you're using the standard code style - `cargo test --workspace` to check that all tests pass > **Note** > from `nushell` you can also use the `toolkit` as follows > ```bash > use toolkit.nu # or use an `env_change` hook to activate it automatically > toolkit check pr > ``` # After Submitting If your PR had any user-facing changes, update [the documentation](https://github.com/nushell/nushell.github.io) after the PR is merged, if necessary. This will help us keep the docs up to date. --- crates/nu-command/src/formats/from/xml.rs | 20 ++++++------ crates/nu-command/tests/commands/all.rs | 2 +- crates/nu-command/tests/commands/any.rs | 2 +- crates/nu-command/tests/commands/append.rs | 2 +- crates/nu-command/tests/commands/compact.rs | 2 +- crates/nu-command/tests/commands/cp.rs | 20 ++++++------ crates/nu-command/tests/commands/default.rs | 2 +- crates/nu-command/tests/commands/enter.rs | 6 ++-- crates/nu-command/tests/commands/format.rs | 2 +- crates/nu-command/tests/commands/get.rs | 4 +-- crates/nu-command/tests/commands/glob.rs | 10 +++--- crates/nu-command/tests/commands/group_by.rs | 6 ++-- crates/nu-command/tests/commands/histogram.rs | 6 ++-- crates/nu-command/tests/commands/ls.rs | 24 ++++++-------- crates/nu-command/tests/commands/merge.rs | 4 +-- .../nu-command/tests/commands/move_/column.rs | 19 +++-------- crates/nu-command/tests/commands/move_/mv.rs | 32 +++++++++---------- crates/nu-command/tests/commands/open.rs | 11 +++---- crates/nu-command/tests/commands/parse.rs | 4 +-- crates/nu-command/tests/commands/prepend.rs | 2 +- crates/nu-command/tests/commands/reject.rs | 4 +-- crates/nu-command/tests/commands/rename.rs | 8 ++--- crates/nu-command/tests/commands/rm.rs | 14 ++++---- crates/nu-command/tests/commands/roll.rs | 2 +- crates/nu-command/tests/commands/select.rs | 6 ++-- .../nu-command/tests/commands/skip/until.rs | 6 ++-- .../nu-command/tests/commands/skip/while_.rs | 6 ++-- crates/nu-command/tests/commands/split_by.rs | 2 +- crates/nu-command/tests/commands/take/rows.rs | 2 +- .../nu-command/tests/commands/take/until.rs | 6 ++-- .../nu-command/tests/commands/take/while_.rs | 6 ++-- crates/nu-command/tests/commands/uniq.rs | 8 ++--- crates/nu-command/tests/commands/uniq_by.rs | 2 +- crates/nu-command/tests/commands/wrap.rs | 4 +-- .../tests/format_conversions/csv.rs | 10 +++--- .../tests/format_conversions/json.rs | 4 +-- .../tests/format_conversions/tsv.rs | 4 +-- .../tests/format_conversions/xml.rs | 2 +- .../fixtures/formats/{jonathan.xml => jt.xml} | 10 +++--- tests/shell/pipeline/commands/external.rs | 10 +++--- tests/shell/pipeline/commands/internal.rs | 4 +-- 41 files changed, 142 insertions(+), 158 deletions(-) rename tests/fixtures/formats/{jonathan.xml => jt.xml} (63%) diff --git a/crates/nu-command/src/formats/from/xml.rs b/crates/nu-command/src/formats/from/xml.rs index d39061fc81..8dd5c1949f 100644 --- a/crates/nu-command/src/formats/from/xml.rs +++ b/crates/nu-command/src/formats/from/xml.rs @@ -395,7 +395,7 @@ mod tests { fn parses_empty_element() -> Result<(), roxmltree::Error> { let source = ""; - assert_eq!(parse(source)?, content_tag("nu", indexmap! {}, &vec![])); + assert_eq!(parse(source)?, content_tag("nu", indexmap! {}, &[])); Ok(()) } @@ -409,7 +409,7 @@ mod tests { content_tag( "nu", indexmap! {}, - &vec![content_string("La era de los tres caballeros")] + &[content_string("La era de los tres caballeros")] ) ); @@ -421,7 +421,7 @@ mod tests { let source = "\ Andrés - Jonathan + JT Yehuda "; @@ -431,9 +431,9 @@ mod tests { "nu", indexmap! {}, &vec![ - content_tag("dev", indexmap! {}, &vec![content_string("Andrés")]), - content_tag("dev", indexmap! {}, &vec![content_string("Jonathan")]), - content_tag("dev", indexmap! {}, &vec![content_string("Yehuda")]) + content_tag("dev", indexmap! {}, &[content_string("Andrés")]), + content_tag("dev", indexmap! {}, &[content_string("JT")]), + content_tag("dev", indexmap! {}, &[content_string("Yehuda")]) ] ) ); @@ -449,7 +449,7 @@ mod tests { assert_eq!( parse(source)?, - content_tag("nu", indexmap! {"version" => "2.0"}, &vec![]) + content_tag("nu", indexmap! {"version" => "2.0"}, &[]) ); Ok(()) @@ -467,10 +467,10 @@ mod tests { content_tag( "nu", indexmap! {"version" => "2.0"}, - &vec![content_tag( + &[content_tag( "version", indexmap! {}, - &vec![content_string("2.0")] + &[content_string("2.0")] )] ) ); @@ -486,7 +486,7 @@ mod tests { assert_eq!( parse(source)?, - content_tag("nu", indexmap! {"version" => "2.0", "age" => "25"}, &vec![]) + content_tag("nu", indexmap! {"version" => "2.0", "age" => "25"}, &[]) ); Ok(()) diff --git a/crates/nu-command/tests/commands/all.rs b/crates/nu-command/tests/commands/all.rs index 41d137bea7..b5ab229bae 100644 --- a/crates/nu-command/tests/commands/all.rs +++ b/crates/nu-command/tests/commands/all.rs @@ -45,7 +45,7 @@ fn checks_all_columns_of_a_table_is_true() { echo [ [ first_name, last_name, rusty_at, likes ]; [ Andrés, Robalino, 10/11/2013, 1 ] - [ Jonathan, Turner, 10/12/2013, 1 ] + [ JT, Turner, 10/12/2013, 1 ] [ Darren, Schroeder, 10/11/2013, 1 ] [ Yehuda, Katz, 10/11/2013, 1 ] ] diff --git a/crates/nu-command/tests/commands/any.rs b/crates/nu-command/tests/commands/any.rs index 22104d8b5e..c4c24fc255 100644 --- a/crates/nu-command/tests/commands/any.rs +++ b/crates/nu-command/tests/commands/any.rs @@ -21,7 +21,7 @@ fn checks_any_column_of_a_table_is_true() { echo [ [ first_name, last_name, rusty_at, likes ]; [ Andrés, Robalino, 10/11/2013, 1 ] - [ Jonathan, Turner, 10/12/2013, 1 ] + [ JT, Turner, 10/12/2013, 1 ] [ Darren, Schroeder, 10/11/2013, 1 ] [ Yehuda, Katz, 10/11/2013, 1 ] ] diff --git a/crates/nu-command/tests/commands/append.rs b/crates/nu-command/tests/commands/append.rs index 4851a60f59..85c0a297c8 100644 --- a/crates/nu-command/tests/commands/append.rs +++ b/crates/nu-command/tests/commands/append.rs @@ -5,7 +5,7 @@ fn adds_a_row_to_the_end() { let actual = nu!( cwd: ".", pipeline( r#" - echo [ "Andrés N. Robalino", "Jonathan Turner", "Yehuda Katz" ] + echo [ "Andrés N. Robalino", "JT Turner", "Yehuda Katz" ] | append "pollo loco" | get 3 "# diff --git a/crates/nu-command/tests/commands/compact.rs b/crates/nu-command/tests/commands/compact.rs index 21b4db674d..c237103b38 100644 --- a/crates/nu-command/tests/commands/compact.rs +++ b/crates/nu-command/tests/commands/compact.rs @@ -11,7 +11,7 @@ fn discards_rows_where_given_column_is_empty() { { "amigos": [ {"name": "Yehuda", "rusty_luck": 1}, - {"name": "Jonathan", "rusty_luck": 1}, + {"name": "JT", "rusty_luck": 1}, {"name": "Andres", "rusty_luck": 1}, {"name":"GorbyPuff"} ] diff --git a/crates/nu-command/tests/commands/cp.rs b/crates/nu-command/tests/commands/cp.rs index 87f6bbe14b..2c9f4f664d 100644 --- a/crates/nu-command/tests/commands/cp.rs +++ b/crates/nu-command/tests/commands/cp.rs @@ -108,7 +108,7 @@ fn copies_the_directory_inside_directory_if_path_to_copy_is_directory_and_with_r .within("originals") .with_files(vec![ EmptyFile("yehuda.txt"), - EmptyFile("jonathan.txt"), + EmptyFile("jttxt"), EmptyFile("andres.txt"), ]) .mkdir("expected"); @@ -126,7 +126,7 @@ fn copies_the_directory_inside_directory_if_path_to_copy_is_directory_and_with_r assert!(files_exist_at( vec![ Path::new("yehuda.txt"), - Path::new("jonathan.txt"), + Path::new("jttxt"), Path::new("andres.txt") ], &expected_dir @@ -148,10 +148,10 @@ fn deep_copies_with_recursive_flag_impl(progress: bool) { .within("originals/contributors") .with_files(vec![ EmptyFile("yehuda.txt"), - EmptyFile("jonathan.txt"), + EmptyFile("jttxt"), EmptyFile("andres.txt"), ]) - .within("originals/contributors/jonathan") + .within("originals/contributors/JT") .with_files(vec![EmptyFile("errors.txt"), EmptyFile("multishells.txt")]) .within("originals/contributors/andres") .with_files(vec![EmptyFile("coverage.txt"), EmptyFile("commands.txt")]) @@ -162,7 +162,7 @@ fn deep_copies_with_recursive_flag_impl(progress: bool) { let expected_dir = dirs.test().join("expected").join("originals"); let progress_flag = if progress { "-p" } else { "" }; - let jonathans_expected_copied_dir = expected_dir.join("contributors").join("jonathan"); + let jts_expected_copied_dir = expected_dir.join("contributors").join("JT"); let andres_expected_copied_dir = expected_dir.join("contributors").join("andres"); let yehudas_expected_copied_dir = expected_dir.join("contributors").join("yehuda"); @@ -175,7 +175,7 @@ fn deep_copies_with_recursive_flag_impl(progress: bool) { assert!(expected_dir.exists()); assert!(files_exist_at( vec![Path::new("errors.txt"), Path::new("multishells.txt")], - jonathans_expected_copied_dir + jts_expected_copied_dir )); assert!(files_exist_at( vec![Path::new("coverage.txt"), Path::new("commands.txt")], @@ -216,7 +216,7 @@ fn copies_using_path_with_wildcard_impl(progress: bool) { vec![ Path::new("caco3_plastics.csv"), Path::new("cargo_sample.toml"), - Path::new("jonathan.xml"), + Path::new("jt.xml"), Path::new("sample.ini"), Path::new("sgml_description.json"), Path::new("utf16.ini"), @@ -261,7 +261,7 @@ fn copies_using_a_glob_impl(progress: bool) { vec![ Path::new("caco3_plastics.csv"), Path::new("cargo_sample.toml"), - Path::new("jonathan.xml"), + Path::new("jt.xml"), Path::new("sample.ini"), Path::new("sgml_description.json"), Path::new("utf16.ini"), @@ -317,7 +317,7 @@ fn copy_files_using_glob_two_parents_up_using_multiple_dots() { fn copy_files_using_glob_two_parents_up_using_multiple_dots_imp(progress: bool) { Playground::setup("cp_test_9", |dirs, sandbox| { sandbox.within("foo").within("bar").with_files(vec![ - EmptyFile("jonathan.json"), + EmptyFile("jtjson"), EmptyFile("andres.xml"), EmptyFile("yehuda.yaml"), EmptyFile("kevin.txt"), @@ -335,7 +335,7 @@ fn copy_files_using_glob_two_parents_up_using_multiple_dots_imp(progress: bool) assert!(files_exist_at( vec![ "yehuda.yaml", - "jonathan.json", + "jtjson", "andres.xml", "kevin.txt", "many_more.ppl", diff --git a/crates/nu-command/tests/commands/default.rs b/crates/nu-command/tests/commands/default.rs index 7a045a6318..78bbd39514 100644 --- a/crates/nu-command/tests/commands/default.rs +++ b/crates/nu-command/tests/commands/default.rs @@ -11,7 +11,7 @@ fn adds_row_data_if_column_missing() { { "amigos": [ {"name": "Yehuda"}, - {"name": "Jonathan", "rusty_luck": 0}, + {"name": "JT", "rusty_luck": 0}, {"name": "Andres", "rusty_luck": 0}, {"name":"GorbyPuff"} ] diff --git a/crates/nu-command/tests/commands/enter.rs b/crates/nu-command/tests/commands/enter.rs index 945a740c8a..0ffcac9468 100644 --- a/crates/nu-command/tests/commands/enter.rs +++ b/crates/nu-command/tests/commands/enter.rs @@ -10,7 +10,7 @@ fn knows_the_filesystems_entered() { .within("red_pill") .with_files(vec![ EmptyFile("andres.nu"), - EmptyFile("jonathan.nu"), + EmptyFile("jtnu"), EmptyFile("yehuda.nu"), ]) .within("blue_pill") @@ -32,7 +32,7 @@ fn knows_the_filesystems_entered() { enter expected mkdir recycled enter ../red_pill - mv jonathan.nu ../expected + mv jtnu ../expected enter ../blue_pill cp *.nxt ../expected/recycled p @@ -54,7 +54,7 @@ fn knows_the_filesystems_entered() { assert!(files_exist_at( vec![ Path::new("andres.nu"), - Path::new("jonathan.nu"), + Path::new("jtnu"), Path::new("yehuda.nu"), ], expected diff --git a/crates/nu-command/tests/commands/format.rs b/crates/nu-command/tests/commands/format.rs index 06ce2879df..63629e203a 100644 --- a/crates/nu-command/tests/commands/format.rs +++ b/crates/nu-command/tests/commands/format.rs @@ -60,7 +60,7 @@ fn format_filesize_works() { Playground::setup("format_filesize_test_1", |dirs, sandbox| { sandbox.with_files(vec![ EmptyFile("yehuda.txt"), - EmptyFile("jonathan.txt"), + EmptyFile("jttxt"), EmptyFile("andres.txt"), ]); diff --git a/crates/nu-command/tests/commands/get.rs b/crates/nu-command/tests/commands/get.rs index 9084ff4e97..a1a3f9c0e7 100644 --- a/crates/nu-command/tests/commands/get.rs +++ b/crates/nu-command/tests/commands/get.rs @@ -45,7 +45,7 @@ fn fetches_by_index() { [package] name = "nu" version = "0.4.1" - authors = ["Yehuda Katz ", "Jonathan Turner ", "Andrés N. Robalino "] + authors = ["Yehuda Katz ", "JT Turner <547158+jntrnr@users.noreply.github.com>", "Andrés N. Robalino "] description = "When arepas shells are tasty and fun." "#, )]); @@ -92,7 +92,7 @@ fn column_paths_are_either_double_quoted_or_regular_unquoted_words_separated_by_ "sample.toml", r#" [package] - 9999 = ["Yehuda Katz ", "Jonathan Turner ", "Andrés N. Robalino "] + 9999 = ["Yehuda Katz ", "JT Turner ", "Andrés N. Robalino "] description = "When arepas shells are tasty and fun." "#, )]); diff --git a/crates/nu-command/tests/commands/glob.rs b/crates/nu-command/tests/commands/glob.rs index 23bdf52fe0..e36cbdeb7b 100644 --- a/crates/nu-command/tests/commands/glob.rs +++ b/crates/nu-command/tests/commands/glob.rs @@ -7,7 +7,7 @@ fn empty_glob_pattern_triggers_error() { Playground::setup("glob_test_1", |dirs, sandbox| { sandbox.with_files(vec![ EmptyFile("yehuda.txt"), - EmptyFile("jonathan.txt"), + EmptyFile("jttxt"), EmptyFile("andres.txt"), ]); @@ -25,7 +25,7 @@ fn nonempty_glob_lists_matching_paths() { Playground::setup("glob_sanity_star", |dirs, sandbox| { sandbox.with_files(vec![ EmptyFile("yehuda.txt"), - EmptyFile("jonathan.txt"), + EmptyFile("jttxt"), EmptyFile("andres.txt"), ]); @@ -43,7 +43,7 @@ fn glob_subdirs() { Playground::setup("glob_subdirs", |dirs, sandbox| { sandbox.with_files(vec![ EmptyFile("yehuda.txt"), - EmptyFile("jonathan.txt"), + EmptyFile("jttxt"), EmptyFile("andres.txt"), ]); sandbox.mkdir("children"); @@ -70,7 +70,7 @@ fn glob_subdirs_ignore_dirs() { Playground::setup("glob_subdirs_ignore_directories", |dirs, sandbox| { sandbox.with_files(vec![ EmptyFile("yehuda.txt"), - EmptyFile("jonathan.txt"), + EmptyFile("jttxt"), EmptyFile("andres.txt"), ]); sandbox.mkdir("children"); @@ -97,7 +97,7 @@ fn glob_ignore_files() { Playground::setup("glob_ignore_files", |dirs, sandbox| { sandbox.with_files(vec![ EmptyFile("yehuda.txt"), - EmptyFile("jonathan.txt"), + EmptyFile("jttxt"), EmptyFile("andres.txt"), ]); sandbox.mkdir("children"); diff --git a/crates/nu-command/tests/commands/group_by.rs b/crates/nu-command/tests/commands/group_by.rs index 7f27ad7f93..87371db486 100644 --- a/crates/nu-command/tests/commands/group_by.rs +++ b/crates/nu-command/tests/commands/group_by.rs @@ -10,7 +10,7 @@ fn groups() { r#" first_name,last_name,rusty_at,type Andrés,Robalino,10/11/2013,A - Jonathan,Turner,10/12/2013,B + JT,Turner,10/12/2013,B Yehuda,Katz,10/11/2013,A "#, )]); @@ -39,7 +39,7 @@ fn errors_if_given_unknown_column_name() { "nu": { "committers": [ {"name": "Andrés N. Robalino"}, - {"name": "Jonathan Turner"}, + {"name": "JT Turner"}, {"name": "Yehuda Katz"} ], "releases": [ @@ -79,7 +79,7 @@ fn errors_if_block_given_evaluates_more_than_one_row() { r#" first_name,last_name,rusty_at,type Andrés,Robalino,10/11/2013,A - Jonathan,Turner,10/12/2013,B + JT,Turner,10/12/2013,B Yehuda,Katz,10/11/2013,A "#, )]); diff --git a/crates/nu-command/tests/commands/histogram.rs b/crates/nu-command/tests/commands/histogram.rs index 95f453d715..4f5d3ce38a 100644 --- a/crates/nu-command/tests/commands/histogram.rs +++ b/crates/nu-command/tests/commands/histogram.rs @@ -10,7 +10,7 @@ fn summarizes_by_column_given() { r#" first_name,last_name,rusty_at Andrés,Robalino,Ecuador - Jonathan,Turner,Estados Unidos + JT,Turner,Estados Unidos Yehuda,Katz,Estados Unidos "#, )]); @@ -42,7 +42,7 @@ fn summarizes_by_column_given_with_normalize_percentage() { r#" first_name,last_name,rusty_at Andrés,Robalino,Ecuador - Jonathan,Turner,Estados Unidos + JT,Turner,Estados Unidos Yehuda,Katz,Estados Unidos "#, )]); @@ -71,7 +71,7 @@ fn summarizes_by_values() { r#" first_name,last_name,rusty_at Andrés,Robalino,Ecuador - Jonathan,Turner,Estados Unidos + JT,Turner,Estados Unidos Yehuda,Katz,Estados Unidos "#, )]); diff --git a/crates/nu-command/tests/commands/ls.rs b/crates/nu-command/tests/commands/ls.rs index 76193e6ca2..37c328349f 100644 --- a/crates/nu-command/tests/commands/ls.rs +++ b/crates/nu-command/tests/commands/ls.rs @@ -7,7 +7,7 @@ fn lists_regular_files() { Playground::setup("ls_test_1", |dirs, sandbox| { sandbox.with_files(vec![ EmptyFile("yehuda.txt"), - EmptyFile("jonathan.txt"), + EmptyFile("jttxt"), EmptyFile("andres.txt"), ]); @@ -50,7 +50,7 @@ fn lists_regular_files_using_question_mark_wildcard() { Playground::setup("ls_test_3", |dirs, sandbox| { sandbox.with_files(vec![ EmptyFile("yehuda.10.txt"), - EmptyFile("jonathan.10.txt"), + EmptyFile("jt.10.txt"), EmptyFile("andres.10.txt"), EmptyFile("chicken_not_to_be_picked_up.100.txt"), ]); @@ -73,10 +73,7 @@ fn lists_all_files_in_directories_from_stream() { sandbox .with_files(vec![EmptyFile("root1.txt"), EmptyFile("root2.txt")]) .within("dir_a") - .with_files(vec![ - EmptyFile("yehuda.10.txt"), - EmptyFile("jonathan.10.txt"), - ]) + .with_files(vec![EmptyFile("yehuda.10.txt"), EmptyFile("jt10.txt")]) .within("dir_b") .with_files(vec![ EmptyFile("andres.10.txt"), @@ -132,7 +129,7 @@ fn list_files_from_two_parents_up_using_multiple_dots() { Playground::setup("ls_test_6", |dirs, sandbox| { sandbox.with_files(vec![ EmptyFile("yahuda.yaml"), - EmptyFile("jonathan.json"), + EmptyFile("jtjson"), EmptyFile("andres.xml"), EmptyFile("kevin.txt"), ]); @@ -185,7 +182,7 @@ fn lists_all_hidden_files_when_glob_contains_dot() { .within("dir_a") .with_files(vec![ EmptyFile("yehuda.10.txt"), - EmptyFile("jonathan.10.txt"), + EmptyFile("jt10.txt"), EmptyFile(".dotfile2"), ]) .within("dir_b") @@ -222,7 +219,7 @@ fn lists_all_hidden_files_when_glob_does_not_contain_dot() { .within("dir_a") .with_files(vec![ EmptyFile("yehuda.10.txt"), - EmptyFile("jonathan.10.txt"), + EmptyFile("jt10.txt"), EmptyFile(".dotfile2"), ]) .within(".dir_b") @@ -284,10 +281,9 @@ fn glob_with_hidden_directory() { #[cfg(unix)] fn fails_with_ls_to_dir_without_permission() { Playground::setup("ls_test_1", |dirs, sandbox| { - sandbox.within("dir_a").with_files(vec![ - EmptyFile("yehuda.11.txt"), - EmptyFile("jonathan.10.txt"), - ]); + sandbox + .within("dir_a") + .with_files(vec![EmptyFile("yehuda.11.txt"), EmptyFile("jt10.txt")]); let actual = nu!( cwd: dirs.test(), pipeline( @@ -317,7 +313,7 @@ fn lists_files_including_starting_with_dot() { Playground::setup("ls_test_9", |dirs, sandbox| { sandbox.with_files(vec![ EmptyFile("yehuda.txt"), - EmptyFile("jonathan.txt"), + EmptyFile("jttxt"), EmptyFile("andres.txt"), EmptyFile(".hidden1.txt"), EmptyFile(".hidden2.txt"), diff --git a/crates/nu-command/tests/commands/merge.rs b/crates/nu-command/tests/commands/merge.rs index 3effea4301..5c30af61ef 100644 --- a/crates/nu-command/tests/commands/merge.rs +++ b/crates/nu-command/tests/commands/merge.rs @@ -11,7 +11,7 @@ fn row() { r#" name,country,luck Andrés,Ecuador,0 - Jonathan,USA,0 + JT,USA,0 Jason,Canada,0 Yehuda,USA,0 "#, @@ -21,7 +21,7 @@ fn row() { r#" name,country,luck Andrés Robalino,Guayaquil Ecuador,1 - Jonathan Turner,New Zealand,1 + JT Turner,New Zealand,1 "#, ), ]); diff --git a/crates/nu-command/tests/commands/move_/column.rs b/crates/nu-command/tests/commands/move_/column.rs index 490197db4c..3efece2aca 100644 --- a/crates/nu-command/tests/commands/move_/column.rs +++ b/crates/nu-command/tests/commands/move_/column.rs @@ -45,10 +45,7 @@ fn moves_columns_before() { -------,-------, D ,---,--------, R ,--------- -------,-------, E ,---,--------, S ,--------- -------,-------, : ,---,--------, : ,--------- - -------,-------, J ,---,--------, O ,--------- - -------,-------, N ,---,--------, A ,--------- - -------,-------, T ,---,--------, H ,--------- - -------,-------, A ,---,--------, N ,--------- + -------,-------, J ,---,--------, T ,--------- "#, )]); @@ -65,7 +62,7 @@ fn moves_columns_before() { "# )); - assert!(actual.out.contains("ANDRES::JONATHAN")); + assert!(actual.out.contains("ANDRES::JT")); }) } @@ -80,10 +77,7 @@ fn moves_a_column_after() { -------,-------, D ,---,--------, R ,--------- -------,-------, E ,---,--------, S ,--------- -------,-------, : ,---,--------, : ,--------- - -------,-------, J ,---,--------, O ,--------- - -------,-------, N ,---,--------, A ,--------- - -------,-------, T ,---,--------, H ,--------- - -------,-------, A ,---,--------, N ,--------- + -------,-------, J ,---,--------, T ,--------- "#, )]); @@ -101,7 +95,7 @@ fn moves_a_column_after() { "# )); - assert!(actual.out.contains("ANDRES::JONATHAN")); + assert!(actual.out.contains("ANDRES::JT")); }) } @@ -116,10 +110,7 @@ fn moves_columns_after() { -------,-------, D ,---,--------, R ,--------- -------,-------, E ,---,--------, S ,--------- -------,-------, : ,---,--------, : ,--------- - -------,-------, J ,---,--------, O ,--------- - -------,-------, N ,---,--------, A ,--------- - -------,-------, T ,---,--------, H ,--------- - -------,-------, A ,---,--------, N ,--------- + -------,-------, J ,---,--------, T ,--------- "#, )]); diff --git a/crates/nu-command/tests/commands/move_/mv.rs b/crates/nu-command/tests/commands/move_/mv.rs index 88283ff22f..acb0a8885d 100644 --- a/crates/nu-command/tests/commands/move_/mv.rs +++ b/crates/nu-command/tests/commands/move_/mv.rs @@ -25,14 +25,14 @@ fn moves_a_file() { #[test] fn overwrites_if_moving_to_existing_file_and_force_provided() { Playground::setup("mv_test_2", |dirs, sandbox| { - sandbox.with_files(vec![EmptyFile("andres.txt"), EmptyFile("jonathan.txt")]); + sandbox.with_files(vec![EmptyFile("andres.txt"), EmptyFile("jttxt")]); let original = dirs.test().join("andres.txt"); - let expected = dirs.test().join("jonathan.txt"); + let expected = dirs.test().join("jttxt"); nu!( cwd: dirs.test(), - "mv andres.txt -f jonathan.txt" + "mv andres.txt -f jttxt" ); assert!(!original.exists()); @@ -62,15 +62,15 @@ fn moves_a_directory() { fn moves_the_file_inside_directory_if_path_to_move_is_existing_directory() { Playground::setup("mv_test_4", |dirs, sandbox| { sandbox - .with_files(vec![EmptyFile("jonathan.txt")]) + .with_files(vec![EmptyFile("jttxt")]) .mkdir("expected"); - let original_dir = dirs.test().join("jonathan.txt"); - let expected = dirs.test().join("expected/jonathan.txt"); + let original_dir = dirs.test().join("jttxt"); + let expected = dirs.test().join("expected/jttxt"); nu!( cwd: dirs.test(), - "mv jonathan.txt expected" + "mv jttxt expected" ); assert!(!original_dir.exists()); @@ -83,7 +83,7 @@ fn moves_the_directory_inside_directory_if_path_to_move_is_existing_directory() Playground::setup("mv_test_5", |dirs, sandbox| { sandbox .within("contributors") - .with_files(vec![EmptyFile("jonathan.txt")]) + .with_files(vec![EmptyFile("jttxt")]) .mkdir("expected"); let original_dir = dirs.test().join("contributors"); @@ -96,7 +96,7 @@ fn moves_the_directory_inside_directory_if_path_to_move_is_existing_directory() assert!(!original_dir.exists()); assert!(expected.exists()); - assert!(files_exist_at(vec!["jonathan.txt"], expected)) + assert!(files_exist_at(vec!["jttxt"], expected)) }) } @@ -109,8 +109,8 @@ fn moves_using_path_with_wildcard() { EmptyFile("andres.ini"), EmptyFile("caco3_plastics.csv"), EmptyFile("cargo_sample.toml"), - EmptyFile("jonathan.ini"), - EmptyFile("jonathan.xml"), + EmptyFile("jt.ini"), + EmptyFile("jt.xml"), EmptyFile("sgml_description.json"), EmptyFile("sample.ini"), EmptyFile("utf16.ini"), @@ -125,7 +125,7 @@ fn moves_using_path_with_wildcard() { nu!(cwd: work_dir, "mv ../originals/*.ini ../expected"); assert!(files_exist_at( - vec!["yehuda.ini", "jonathan.ini", "sample.ini", "andres.ini",], + vec!["yehuda.ini", "jt.ini", "sample.ini", "andres.ini",], expected )); }) @@ -210,11 +210,11 @@ fn errors_if_source_doesnt_exist() { #[test] fn error_if_moving_to_existing_file_without_force() { Playground::setup("mv_test_10_0", |dirs, sandbox| { - sandbox.with_files(vec![EmptyFile("andres.txt"), EmptyFile("jonathan.txt")]); + sandbox.with_files(vec![EmptyFile("andres.txt"), EmptyFile("jttxt")]); let actual = nu!( cwd: dirs.test(), - "mv andres.txt jonathan.txt" + "mv andres.txt jttxt" ); assert!(actual.err.contains("file already exists")) }) @@ -309,7 +309,7 @@ fn does_not_error_on_relative_parent_path() { fn move_files_using_glob_two_parents_up_using_multiple_dots() { Playground::setup("mv_test_12", |dirs, sandbox| { sandbox.within("foo").within("bar").with_files(vec![ - EmptyFile("jonathan.json"), + EmptyFile("jtjson"), EmptyFile("andres.xml"), EmptyFile("yehuda.yaml"), EmptyFile("kevin.txt"), @@ -325,7 +325,7 @@ fn move_files_using_glob_two_parents_up_using_multiple_dots() { let files = vec![ "yehuda.yaml", - "jonathan.json", + "jtjson", "andres.xml", "kevin.txt", "many_more.ppl", diff --git a/crates/nu-command/tests/commands/open.rs b/crates/nu-command/tests/commands/open.rs index 0e692e859e..bd7652cebf 100644 --- a/crates/nu-command/tests/commands/open.rs +++ b/crates/nu-command/tests/commands/open.rs @@ -10,7 +10,7 @@ fn parses_csv() { "nu.zion.csv", r#" author,lang,source - Jonathan Turner,Rust,New Zealand + JT Turner,Rust,New Zealand Andres N. Robalino,Rust,Ecuador Yehuda Katz,Rust,Estados Unidos "#, @@ -180,7 +180,7 @@ fn parses_xml() { let actual = nu!( cwd: "tests/fixtures/formats", pipeline(r#" - open jonathan.xml + open jt.xml | get content | where tag == channel | get content @@ -193,10 +193,7 @@ fn parses_xml() { "#) ); - assert_eq!( - actual.out, - "http://www.jonathanturner.org/2015/10/off-to-new-adventures.html" - ) + assert_eq!(actual.out, "https://www.jntrnr.com/off-to-new-adventures/") } #[cfg(feature = "dataframe")] @@ -242,7 +239,7 @@ fn open_dir_is_ls() { Playground::setup("open_dir", |dirs, sandbox| { sandbox.with_files(vec![ EmptyFile("yehuda.txt"), - EmptyFile("jonathan.txt"), + EmptyFile("jttxt"), EmptyFile("andres.txt"), ]); diff --git a/crates/nu-command/tests/commands/parse.rs b/crates/nu-command/tests/commands/parse.rs index 471c9db548..21a49107e4 100644 --- a/crates/nu-command/tests/commands/parse.rs +++ b/crates/nu-command/tests/commands/parse.rs @@ -12,7 +12,7 @@ mod simple { "key_value_separated_arepa_ingredients.txt", r#" VAR1=Cheese - VAR2=JonathanParsed + VAR2=JTParsed VAR3=NushellSecretIngredient "#, )]); @@ -29,7 +29,7 @@ mod simple { "# )); - assert_eq!(actual.out, "JonathanParsed"); + assert_eq!(actual.out, "JTParsed"); }) } diff --git a/crates/nu-command/tests/commands/prepend.rs b/crates/nu-command/tests/commands/prepend.rs index c062855767..6af762225c 100644 --- a/crates/nu-command/tests/commands/prepend.rs +++ b/crates/nu-command/tests/commands/prepend.rs @@ -9,7 +9,7 @@ fn adds_a_row_to_the_beginning() { "los_tres_caballeros.txt", r#" Andrés N. Robalino - Jonathan Turner + JT Turner Yehuda Katz "#, )]); diff --git a/crates/nu-command/tests/commands/reject.rs b/crates/nu-command/tests/commands/reject.rs index f9dd15c858..fa9add2afa 100644 --- a/crates/nu-command/tests/commands/reject.rs +++ b/crates/nu-command/tests/commands/reject.rs @@ -8,7 +8,7 @@ fn regular_columns() { [first_name, last_name, rusty_at, type]; [Andrés Robalino 10/11/2013 A] - [Jonathan Turner 10/12/2013 B] + [JT Turner 10/12/2013 B] [Yehuda Katz 10/11/2013 A] ] | reject type first_name @@ -36,7 +36,7 @@ fn complex_nested_columns() { "nu": { "committers": [ {"name": "Andrés N. Robalino"}, - {"name": "Jonathan Turner"}, + {"name": "JT Turner"}, {"name": "Yehuda Katz"} ], "releases": [ diff --git a/crates/nu-command/tests/commands/rename.rs b/crates/nu-command/tests/commands/rename.rs index 5cfb0f826e..19d733f70c 100644 --- a/crates/nu-command/tests/commands/rename.rs +++ b/crates/nu-command/tests/commands/rename.rs @@ -9,7 +9,7 @@ fn changes_the_column_name() { "los_cuatro_mosqueteros.txt", r#" Andrés N. Robalino - Jonathan Turner + JT Turner Yehuda Katz Jason Gedge "#, @@ -38,7 +38,7 @@ fn keeps_remaining_original_names_given_less_new_names_than_total_original_names "los_cuatro_mosqueteros.txt", r#" Andrés N. Robalino - Jonathan Turner + JT Turner Yehuda Katz Jason Gedge "#, @@ -68,7 +68,7 @@ fn errors_if_no_columns_present() { "los_cuatro_mosqueteros.txt", r#" Andrés N. Robalino - Jonathan Turner + JT Turner Yehuda Katz Jason Gedge "#, @@ -94,7 +94,7 @@ fn errors_if_columns_param_is_empty() { "los_cuatro_mosqueteros.txt", r#" Andrés N. Robalino - Jonathan Turner + JT Turner Yehuda Katz Jason Gedge "#, diff --git a/crates/nu-command/tests/commands/rm.rs b/crates/nu-command/tests/commands/rm.rs index 0a3d7d6e3e..9ea7741112 100644 --- a/crates/nu-command/tests/commands/rm.rs +++ b/crates/nu-command/tests/commands/rm.rs @@ -108,7 +108,7 @@ fn removes_directory_contents_with_recursive_flag() { Playground::setup("rm_test_5", |dirs, sandbox| { sandbox.with_files(vec![ EmptyFile("yehuda.txt"), - EmptyFile("jonathan.txt"), + EmptyFile("jttxt"), EmptyFile("andres.txt"), ]); @@ -187,13 +187,13 @@ fn removes_multiple_files() { Playground::setup("rm_test_10", |dirs, sandbox| { sandbox.with_files(vec![ EmptyFile("yehuda.txt"), - EmptyFile("jonathan.txt"), + EmptyFile("jttxt"), EmptyFile("andres.txt"), ]); nu!( cwd: dirs.test(), - "rm yehuda.txt jonathan.txt andres.txt" + "rm yehuda.txt jttxt andres.txt" ); assert_eq!( @@ -208,7 +208,7 @@ fn removes_multiple_files_with_asterisks() { Playground::setup("rm_test_11", |dirs, sandbox| { sandbox.with_files(vec![ EmptyFile("yehuda.txt"), - EmptyFile("jonathan.txt"), + EmptyFile("jt.txt"), EmptyFile("andres.toml"), ]); @@ -227,7 +227,7 @@ fn removes_multiple_files_with_asterisks() { #[test] fn allows_doubly_specified_file() { Playground::setup("rm_test_12", |dirs, sandbox| { - sandbox.with_files(vec![EmptyFile("yehuda.txt"), EmptyFile("jonathan.toml")]); + sandbox.with_files(vec![EmptyFile("yehuda.txt"), EmptyFile("jt.toml")]); let actual = nu!( cwd: dirs.test(), @@ -247,7 +247,7 @@ fn remove_files_from_two_parents_up_using_multiple_dots_and_glob() { Playground::setup("rm_test_13", |dirs, sandbox| { sandbox.with_files(vec![ EmptyFile("yehuda.txt"), - EmptyFile("jonathan.txt"), + EmptyFile("jt.txt"), EmptyFile("kevin.txt"), ]); @@ -259,7 +259,7 @@ fn remove_files_from_two_parents_up_using_multiple_dots_and_glob() { ); assert!(!files_exist_at( - vec!["yehuda.txt", "jonathan.txt", "kevin.txt"], + vec!["yehuda.txt", "jttxt", "kevin.txt"], dirs.test() )); }) diff --git a/crates/nu-command/tests/commands/roll.rs b/crates/nu-command/tests/commands/roll.rs index 26f5b767b0..fc3088393e 100644 --- a/crates/nu-command/tests/commands/roll.rs +++ b/crates/nu-command/tests/commands/roll.rs @@ -55,7 +55,7 @@ mod columns { [ "Andres", EC, amarillito] [ "Darren", US, black] - [ "Jonathan", US, black] + [ "JT", US, black] [ "Yehuda", US, black] [ "Jason", CA, gold] ]"#, diff --git a/crates/nu-command/tests/commands/select.rs b/crates/nu-command/tests/commands/select.rs index e01eb2a0a3..9f7d3a99ba 100644 --- a/crates/nu-command/tests/commands/select.rs +++ b/crates/nu-command/tests/commands/select.rs @@ -10,7 +10,7 @@ fn regular_columns() { [first_name, last_name, rusty_at, type]; [Andrés Robalino 10/11/2013 A] - [Jonathan Turner 10/12/2013 B] + [JT Turner 10/12/2013 B] [Yehuda Katz 10/11/2013 A] ] | select rusty_at last_name @@ -32,7 +32,7 @@ fn complex_nested_columns() { "nu": { "committers": [ {"name": "Andrés N. Robalino"}, - {"name": "Jonathan Turner"}, + {"name": "JT Turner"}, {"name": "Yehuda Katz"} ], "releases": [ @@ -73,7 +73,7 @@ fn fails_if_given_unknown_column_name() { [first_name, last_name, rusty_at, type]; [Andrés Robalino 10/11/2013 A] - [Jonathan Turner 10/12/2013 B] + [JT Turner 10/12/2013 B] [Yehuda Katz 10/11/2013 A] ] | select rrusty_at first_name diff --git a/crates/nu-command/tests/commands/skip/until.rs b/crates/nu-command/tests/commands/skip/until.rs index 73260672dd..e6acc9c5cd 100644 --- a/crates/nu-command/tests/commands/skip/until.rs +++ b/crates/nu-command/tests/commands/skip/until.rs @@ -13,17 +13,17 @@ fn condition_is_met() { Chicken Collection,29/04/2020,30/04/2020,31/04/2020 Yellow Chickens,,, Andrés,0,0,1 - Jonathan,0,0,1 + JT,0,0,1 Jason,0,0,1 Yehuda,0,0,1 Blue Chickens,,, Andrés,0,0,1 - Jonathan,0,0,1 + JT,0,0,1 Jason,0,0,1 Yehuda,0,0,2 Red Chickens,,, Andrés,0,0,1 - Jonathan,0,0,1 + JT,0,0,1 Jason,0,0,1 Yehuda,0,0,3 "#, diff --git a/crates/nu-command/tests/commands/skip/while_.rs b/crates/nu-command/tests/commands/skip/while_.rs index 817cf90952..b008ba4dad 100644 --- a/crates/nu-command/tests/commands/skip/while_.rs +++ b/crates/nu-command/tests/commands/skip/while_.rs @@ -13,17 +13,17 @@ fn condition_is_met() { Chicken Collection,29/04/2020,30/04/2020,31/04/2020 Yellow Chickens,,, Andrés,0,0,1 - Jonathan,0,0,1 + JT,0,0,1 Jason,0,0,1 Yehuda,0,0,1 Blue Chickens,,, Andrés,0,0,1 - Jonathan,0,0,1 + JT,0,0,1 Jason,0,0,1 Yehuda,0,0,2 Red Chickens,,, Andrés,0,0,1 - Jonathan,0,0,1 + JT,0,0,1 Jason,0,0,1 Yehuda,0,0,3 "#, diff --git a/crates/nu-command/tests/commands/split_by.rs b/crates/nu-command/tests/commands/split_by.rs index 7cfede1a14..d52c653738 100644 --- a/crates/nu-command/tests/commands/split_by.rs +++ b/crates/nu-command/tests/commands/split_by.rs @@ -10,7 +10,7 @@ fn splits() { r#" first_name,last_name,rusty_at,type Andrés,Robalino,10/11/2013,A - Jonathan,Turner,10/12/2013,B + JT,Turner,10/12/2013,B Yehuda,Katz,10/11/2013,A "#, )]); diff --git a/crates/nu-command/tests/commands/take/rows.rs b/crates/nu-command/tests/commands/take/rows.rs index d50a72a765..3f57a5911c 100644 --- a/crates/nu-command/tests/commands/take/rows.rs +++ b/crates/nu-command/tests/commands/take/rows.rs @@ -10,7 +10,7 @@ fn rows() { r#" name,lucky_code Andrés,1 - Jonathan,1 + JT,1 Jason,2 Yehuda,1 "#, diff --git a/crates/nu-command/tests/commands/take/until.rs b/crates/nu-command/tests/commands/take/until.rs index d7ba73d442..5a6aaebc70 100644 --- a/crates/nu-command/tests/commands/take/until.rs +++ b/crates/nu-command/tests/commands/take/until.rs @@ -13,17 +13,17 @@ fn condition_is_met() { Chicken Collection,29/04/2020,30/04/2020,31/04/2020 Yellow Chickens,,, Andrés,1,1,1 - Jonathan,1,1,1 + JT,1,1,1 Jason,1,1,1 Yehuda,1,1,1 Blue Chickens,,, Andrés,1,1,2 - Jonathan,1,1,2 + JT,1,1,2 Jason,1,1,2 Yehuda,1,1,2 Red Chickens,,, Andrés,1,1,3 - Jonathan,1,1,3 + JT,1,1,3 Jason,1,1,3 Yehuda,1,1,3 "#, diff --git a/crates/nu-command/tests/commands/take/while_.rs b/crates/nu-command/tests/commands/take/while_.rs index c54983f30f..33e052ffdc 100644 --- a/crates/nu-command/tests/commands/take/while_.rs +++ b/crates/nu-command/tests/commands/take/while_.rs @@ -13,17 +13,17 @@ fn condition_is_met() { Chicken Collection,29/04/2020,30/04/2020,31/04/2020 Yellow Chickens,,, Andrés,1,1,1 - Jonathan,1,1,1 + JT,1,1,1 Jason,1,1,1 Yehuda,1,1,1 Blue Chickens,,, Andrés,1,1,2 - Jonathan,1,1,2 + JT,1,1,2 Jason,1,1,2 Yehuda,1,1,2 Red Chickens,,, Andrés,1,1,3 - Jonathan,1,1,3 + JT,1,1,3 Jason,1,1,3 Yehuda,1,1,3 "#, diff --git a/crates/nu-command/tests/commands/uniq.rs b/crates/nu-command/tests/commands/uniq.rs index 70d98b3b6b..9246287ef9 100644 --- a/crates/nu-command/tests/commands/uniq.rs +++ b/crates/nu-command/tests/commands/uniq.rs @@ -10,9 +10,9 @@ fn removes_duplicate_rows() { r#" first_name,last_name,rusty_at,type Andrés,Robalino,10/11/2013,A - Jonathan,Turner,10/12/2013,B + JT,Turner,10/12/2013,B Yehuda,Katz,10/11/2013,A - Jonathan,Turner,10/12/2013,B + JT,Turner,10/12/2013,B Yehuda,Katz,10/11/2013,A "#, )]); @@ -39,9 +39,9 @@ fn uniq_values() { r#" first_name,last_name,rusty_at,type Andrés,Robalino,10/11/2013,A - Jonathan,Turner,10/12/2013,B + JT,Turner,10/12/2013,B Yehuda,Katz,10/11/2013,A - Jonathan,Turner,10/12/2013,B + JT,Turner,10/12/2013,B Yehuda,Katz,10/11/2013,A "#, )]); diff --git a/crates/nu-command/tests/commands/uniq_by.rs b/crates/nu-command/tests/commands/uniq_by.rs index d94601ef74..20100bbfa1 100644 --- a/crates/nu-command/tests/commands/uniq_by.rs +++ b/crates/nu-command/tests/commands/uniq_by.rs @@ -12,7 +12,7 @@ fn removes_duplicate_rows() { Andrés,Robalino,10/11/2013,A Afonso,Turner,10/12/2013,B Yehuda,Katz,10/11/2013,A - Jonathan,Turner,11/12/2011,O + JT,Turner,11/12/2011,O "#, )]); diff --git a/crates/nu-command/tests/commands/wrap.rs b/crates/nu-command/tests/commands/wrap.rs index dfee3ae92e..597fb99dfe 100644 --- a/crates/nu-command/tests/commands/wrap.rs +++ b/crates/nu-command/tests/commands/wrap.rs @@ -10,7 +10,7 @@ fn wrap_rows_into_a_row() { r#" first_name,last_name Andrés,Robalino - Jonathan,Turner + JT,Turner Yehuda,Katz "#, )]); @@ -39,7 +39,7 @@ fn wrap_rows_into_a_table() { r#" first_name,last_name Andrés,Robalino - Jonathan,Turner + JT,Turner Yehuda,Katz "#, )]); diff --git a/crates/nu-command/tests/format_conversions/csv.rs b/crates/nu-command/tests/format_conversions/csv.rs index 6c1ab564b5..61372a410b 100644 --- a/crates/nu-command/tests/format_conversions/csv.rs +++ b/crates/nu-command/tests/format_conversions/csv.rs @@ -82,7 +82,7 @@ fn infers_types() { r#" first_name,last_name,rusty_luck,d Andrés,Robalino,1,d - Jonathan,Turner,1,d + JT,Turner,1,d Yehuda,Katz,1,d Jason,Gedge,1,d "#, @@ -109,7 +109,7 @@ fn from_csv_text_to_table() { r#" first_name,last_name,rusty_luck Andrés,Robalino,1 - Jonathan,Turner,1 + JT,Turner,1 Yehuda,Katz,1 "#, )]); @@ -136,7 +136,7 @@ fn from_csv_text_with_separator_to_table() { r#" first_name;last_name;rusty_luck Andrés;Robalino;1 - Jonathan;Turner;1 + JT;Turner;1 Yehuda;Katz;1 "#, )]); @@ -163,7 +163,7 @@ fn from_csv_text_with_tab_separator_to_table() { r#" first_name last_name rusty_luck Andrés Robalino 1 - Jonathan Turner 1 + JT Turner 1 Yehuda Katz 1 "#, )]); @@ -189,7 +189,7 @@ fn from_csv_text_skipping_headers_to_table() { "los_tres_amigos.txt", r#" Andrés,Robalino,1 - Jonathan,Turner,1 + JT,Turner,1 Yehuda,Katz,1 "#, )]); diff --git a/crates/nu-command/tests/format_conversions/json.rs b/crates/nu-command/tests/format_conversions/json.rs index 1f0fb81198..2ca0e67828 100644 --- a/crates/nu-command/tests/format_conversions/json.rs +++ b/crates/nu-command/tests/format_conversions/json.rs @@ -26,7 +26,7 @@ fn from_json_text_to_table() { { "katz": [ {"name": "Yehuda", "rusty_luck": 1}, - {"name": "Jonathan", "rusty_luck": 1}, + {"name": "JT", "rusty_luck": 1}, {"name": "Andres", "rusty_luck": 1}, {"name":"GorbyPuff", "rusty_luck": 1} ] @@ -50,7 +50,7 @@ fn from_json_text_recognizing_objects_independently_to_table() { "katz.txt", r#" {"name": "Yehuda", "rusty_luck": 1} - {"name": "Jonathan", "rusty_luck": 1} + {"name": "JT", "rusty_luck": 1} {"name": "Andres", "rusty_luck": 1} {"name":"GorbyPuff", "rusty_luck": 3} "#, diff --git a/crates/nu-command/tests/format_conversions/tsv.rs b/crates/nu-command/tests/format_conversions/tsv.rs index ef2dae6c75..0670dfafa7 100644 --- a/crates/nu-command/tests/format_conversions/tsv.rs +++ b/crates/nu-command/tests/format_conversions/tsv.rs @@ -86,7 +86,7 @@ fn from_tsv_text_to_table() { r#" first Name Last Name rusty_luck Andrés Robalino 1 - Jonathan Turner 1 + JT Turner 1 Yehuda Katz 1 "#, )]); @@ -112,7 +112,7 @@ fn from_tsv_text_skipping_headers_to_table() { "los_tres_amigos.txt", r#" Andrés Robalino 1 - Jonathan Turner 1 + JT Turner 1 Yehuda Katz 1 "#, )]); diff --git a/crates/nu-command/tests/format_conversions/xml.rs b/crates/nu-command/tests/format_conversions/xml.rs index 5f05816b44..b92186e167 100644 --- a/crates/nu-command/tests/format_conversions/xml.rs +++ b/crates/nu-command/tests/format_conversions/xml.rs @@ -5,7 +5,7 @@ fn table_to_xml_text_and_from_xml_text_back_into_table() { let actual = nu!( cwd: "tests/fixtures/formats", pipeline( r#" - open jonathan.xml + open jt.xml | to xml | from xml | get content diff --git a/tests/fixtures/formats/jonathan.xml b/tests/fixtures/formats/jt.xml similarity index 63% rename from tests/fixtures/formats/jonathan.xml rename to tests/fixtures/formats/jt.xml index 0ce0016c19..1f62a5d5e5 100644 --- a/tests/fixtures/formats/jonathan.xml +++ b/tests/fixtures/formats/jt.xml @@ -1,9 +1,9 @@ - Jonathan Turner - http://www.jonathanturner.org - + JT + http://www.jntrnr.com + Creating crossplatform Rust terminal apps @@ -14,8 +14,8 @@ <p>Part of the adventure is not seeing the way ahead and going anyway.</p> Mon, 05 Oct 2015 00:00:00 +0000 - http://www.jonathanturner.org/2015/10/off-to-new-adventures.html - http://www.jonathanturner.org/2015/10/off-to-new-adventures.html + https://www.jntrnr.com/off-to-new-adventures/ + https://www.jntrnr.com/off-to-new-adventures/ diff --git a/tests/shell/pipeline/commands/external.rs b/tests/shell/pipeline/commands/external.rs index 69126aeaff..03c1053615 100644 --- a/tests/shell/pipeline/commands/external.rs +++ b/tests/shell/pipeline/commands/external.rs @@ -148,7 +148,7 @@ mod it_evaluation { fn takes_rows_of_nu_value_strings() { Playground::setup("it_argument_test_1", |dirs, sandbox| { sandbox.with_files(vec![ - EmptyFile("jonathan_likes_cake.txt"), + EmptyFile("jt_likes_cake.txt"), EmptyFile("andres_likes_arepas.txt"), ]); @@ -163,7 +163,7 @@ mod it_evaluation { "# )); - assert_eq!(actual.out, "jonathan_likes_cake.txt"); + assert_eq!(actual.out, "jt_likes_cake.txt"); }) } @@ -436,7 +436,7 @@ mod external_command_arguments { "expands_table_of_primitives_to_positional_arguments", |dirs, sandbox| { sandbox.with_files(vec![ - EmptyFile("jonathan_likes_cake.txt"), + EmptyFile("jt_likes_cake.txt"), EmptyFile("andres_likes_arepas.txt"), EmptyFile("ferris_not_here.txt"), ]); @@ -450,7 +450,7 @@ mod external_command_arguments { assert_eq!( actual.out, - "andres_likes_arepas.txt ferris_not_here.txt jonathan_likes_cake.txt" + "andres_likes_arepas.txt ferris_not_here.txt jt_likes_cake.txt" ); }, ) @@ -462,7 +462,7 @@ mod external_command_arguments { "expands_table_of_primitives_to_positional_arguments", |dirs, sandbox| { sandbox.with_files(vec![ - EmptyFile("jonathan_likes_cake.txt"), + EmptyFile("jt_likes_cake.txt"), EmptyFile("andres_likes_arepas.txt"), EmptyFile("ferris_not_here.txt"), ]); diff --git a/tests/shell/pipeline/commands/internal.rs b/tests/shell/pipeline/commands/internal.rs index 1a78dd101a..8ee00d662c 100644 --- a/tests/shell/pipeline/commands/internal.rs +++ b/tests/shell/pipeline/commands/internal.rs @@ -11,7 +11,7 @@ fn takes_rows_of_nu_value_strings_and_pipes_it_to_stdin_of_external() { r#" name,rusty_luck,origin Jason,1,Canada - Jonathan,1,New Zealand + JT,1,New Zealand Andrés,1,Ecuador AndKitKatz,1,Estados Unidos "#, @@ -103,7 +103,7 @@ fn subexpression_handles_dot() { r#" name,rusty_luck,origin Jason,1,Canada - Jonathan,1,New Zealand + JT,1,New Zealand Andrés,1,Ecuador AndKitKatz,1,Estados Unidos "#,