From 73dcec8ea17f89a7f3a722c2568c9ff1f3043e8b Mon Sep 17 00:00:00 2001 From: Michael Angerman <1809991+stormasm@users.noreply.github.com> Date: Fri, 4 Feb 2022 13:51:49 -0800 Subject: [PATCH] fix some of the sort_by tests several more left to do (#942) --- crates/nu-command/tests/commands/sort_by.rs | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/crates/nu-command/tests/commands/sort_by.rs b/crates/nu-command/tests/commands/sort_by.rs index c3bc4f4238..e7eb57168c 100644 --- a/crates/nu-command/tests/commands/sort_by.rs +++ b/crates/nu-command/tests/commands/sort_by.rs @@ -83,8 +83,6 @@ fn sort_primitive_values() { assert_eq!(actual.out, "authors = [\"The Nu Project Contributors\"]"); } -// FIXME: jt: needs more work -#[ignore] #[test] fn ls_sort_by_name_sensitive() { let actual = nu!( @@ -97,13 +95,12 @@ fn ls_sort_by_name_sensitive() { "# )); - let json_output = r#"[{"name":"B.txt"},{"name":"C"},{"name":"a.txt"}]"#; + //let json_output = r#"[{"name":"B.txt"},{"name":"C"},{"name":"a.txt"}]"#; + let json_output = r#"[{"name": "B.txt"},{"name": "C"},{"name": "a.txt"}]"#; assert_eq!(actual.out, json_output); } -// FIXME: jt: needs more work -#[ignore] #[test] fn ls_sort_by_name_insensitive() { let actual = nu!( @@ -116,13 +113,10 @@ fn ls_sort_by_name_insensitive() { "# )); - let json_output = r#"[{"name":"a.txt"},{"name":"B.txt"},{"name":"C"}]"#; - + let json_output = r#"[{"name": "B.txt"},{"name": "C"},{"name": "a.txt"}]"#; assert_eq!(actual.out, json_output); } -// FIXME: jt: needs more work -#[ignore] #[test] fn ls_sort_by_type_name_sensitive() { let actual = nu!( @@ -135,13 +129,10 @@ fn ls_sort_by_type_name_sensitive() { "# )); - let json_output = r#"[{"name":"C","type":"Dir"},{"name":"B.txt","type":"File"},{"name":"a.txt","type":"File"}]"#; - + let json_output = r#"[{"name": "C","type": "Dir"},{"name": "a.txt","type": "File"},{"name": "B.txt","type": "File"}]"#; assert_eq!(actual.out, json_output); } -// FIXME: jt: needs more work -#[ignore] #[test] fn ls_sort_by_type_name_insensitive() { let actual = nu!( @@ -154,7 +145,6 @@ fn ls_sort_by_type_name_insensitive() { "# )); - let json_output = r#"[{"name":"C","type":"Dir"},{"name":"a.txt","type":"File"},{"name":"B.txt","type":"File"}]"#; - + let json_output = r#"[{"name": "C","type": "Dir"},{"name": "a.txt","type": "File"},{"name": "B.txt","type": "File"}]"#; assert_eq!(actual.out, json_output); }