mirror of
https://github.com/nushell/nushell.git
synced 2025-08-18 09:59:47 +02:00
Add support for primitive values to sort-by (#1241)
* Remove redundant clone * Add support for primitive values to sort-by #1238
This commit is contained in:
committed by
Jonathan Turner
parent
47d987d37f
commit
e059c74a06
@@ -21,3 +21,21 @@ fn by_column() {
|
||||
|
||||
assert_eq!(actual, "description");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn sort_primitive_values() {
|
||||
let actual = nu!(
|
||||
cwd: "tests/fixtures/formats", pipeline(
|
||||
r#"
|
||||
open cargo_sample.toml --raw
|
||||
| lines
|
||||
| skip 1
|
||||
| first 6
|
||||
| sort-by
|
||||
| first 1
|
||||
| echo $it
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual, "authors = [\"Yehuda Katz <wycats@gmail.com>\"]");
|
||||
}
|
||||
|
Reference in New Issue
Block a user