mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 04:15:08 +02:00
engine-q merge
This commit is contained in:
@ -1,5 +1,10 @@
|
||||
use nu_test_support::{nu, pipeline};
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
// FIXME: jt: needs more work
|
||||
#[ignore]
|
||||
>>>>>>> 9259a56a28f1dd3a4b720ad815aa19c6eaf6adce
|
||||
#[test]
|
||||
fn by_column() {
|
||||
let actual = nu!(
|
||||
@ -21,6 +26,11 @@ fn by_column() {
|
||||
assert_eq!(actual.out, "description");
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
// FIXME: jt: needs more work
|
||||
#[ignore]
|
||||
>>>>>>> 9259a56a28f1dd3a4b720ad815aa19c6eaf6adce
|
||||
#[test]
|
||||
fn by_invalid_column() {
|
||||
let actual = nu!(
|
||||
@ -43,6 +53,11 @@ fn by_invalid_column() {
|
||||
assert!(actual.err.contains("invalid column"));
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
// FIXME: jt: needs more work
|
||||
#[ignore]
|
||||
>>>>>>> 9259a56a28f1dd3a4b720ad815aa19c6eaf6adce
|
||||
#[test]
|
||||
fn by_invalid_types() {
|
||||
let actual = nu!(
|
||||
@ -85,11 +100,20 @@ fn ls_sort_by_name_sensitive() {
|
||||
open sample-ls-output.json
|
||||
| sort-by name
|
||||
| select name
|
||||
<<<<<<< HEAD
|
||||
| to json
|
||||
"#
|
||||
));
|
||||
|
||||
let json_output = r#"[{"name":"B.txt"},{"name":"C"},{"name":"a.txt"}]"#;
|
||||
=======
|
||||
| to json --raw
|
||||
"#
|
||||
));
|
||||
|
||||
//let json_output = r#"[{"name":"B.txt"},{"name":"C"},{"name":"a.txt"}]"#;
|
||||
let json_output = r#"[{"name": "B.txt"},{"name": "C"},{"name": "a.txt"}]"#;
|
||||
>>>>>>> 9259a56a28f1dd3a4b720ad815aa19c6eaf6adce
|
||||
|
||||
assert_eq!(actual.out, json_output);
|
||||
}
|
||||
@ -102,12 +126,20 @@ fn ls_sort_by_name_insensitive() {
|
||||
open sample-ls-output.json
|
||||
| sort-by -i name
|
||||
| select name
|
||||
<<<<<<< HEAD
|
||||
| to json
|
||||
"#
|
||||
));
|
||||
|
||||
let json_output = r#"[{"name":"a.txt"},{"name":"B.txt"},{"name":"C"}]"#;
|
||||
|
||||
=======
|
||||
| to json --raw
|
||||
"#
|
||||
));
|
||||
|
||||
let json_output = r#"[{"name": "B.txt"},{"name": "C"},{"name": "a.txt"}]"#;
|
||||
>>>>>>> 9259a56a28f1dd3a4b720ad815aa19c6eaf6adce
|
||||
assert_eq!(actual.out, json_output);
|
||||
}
|
||||
|
||||
@ -119,12 +151,20 @@ fn ls_sort_by_type_name_sensitive() {
|
||||
open sample-ls-output.json
|
||||
| sort-by type name
|
||||
| select name type
|
||||
<<<<<<< HEAD
|
||||
| to json
|
||||
"#
|
||||
));
|
||||
|
||||
let json_output = r#"[{"name":"C","type":"Dir"},{"name":"B.txt","type":"File"},{"name":"a.txt","type":"File"}]"#;
|
||||
|
||||
=======
|
||||
| to json --raw
|
||||
"#
|
||||
));
|
||||
|
||||
let json_output = r#"[{"name": "C","type": "Dir"},{"name": "a.txt","type": "File"},{"name": "B.txt","type": "File"}]"#;
|
||||
>>>>>>> 9259a56a28f1dd3a4b720ad815aa19c6eaf6adce
|
||||
assert_eq!(actual.out, json_output);
|
||||
}
|
||||
|
||||
@ -136,11 +176,19 @@ fn ls_sort_by_type_name_insensitive() {
|
||||
open sample-ls-output.json
|
||||
| sort-by -i type name
|
||||
| select name type
|
||||
<<<<<<< HEAD
|
||||
| to json
|
||||
"#
|
||||
));
|
||||
|
||||
let json_output = r#"[{"name":"C","type":"Dir"},{"name":"a.txt","type":"File"},{"name":"B.txt","type":"File"}]"#;
|
||||
|
||||
=======
|
||||
| to json --raw
|
||||
"#
|
||||
));
|
||||
|
||||
let json_output = r#"[{"name": "C","type": "Dir"},{"name": "a.txt","type": "File"},{"name": "B.txt","type": "File"}]"#;
|
||||
>>>>>>> 9259a56a28f1dd3a4b720ad815aa19c6eaf6adce
|
||||
assert_eq!(actual.out, json_output);
|
||||
}
|
||||
|
Reference in New Issue
Block a user