mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 08:55:40 +02:00
last, skip, drop, take until, take while, skip until, skip while, where, reverse, shuffle, append, prepend and sort-by raise error when given non-lists (#7623)
Closes https://github.com/nushell/nushell/issues/6941
This commit is contained in:
@ -65,7 +65,7 @@ fn rows() {
|
||||
|
||||
#[test]
|
||||
fn more_rows_than_table_has() {
|
||||
let actual = nu!(cwd: ".", "date | drop 50 | length");
|
||||
let actual = nu!(cwd: ".", "[date] | drop 50 | length");
|
||||
|
||||
assert_eq!(actual.out, "0");
|
||||
}
|
||||
@ -90,3 +90,10 @@ fn nth_missing_first_argument() {
|
||||
|
||||
assert!(actual.err.contains("int or range"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn fail_on_non_iterator() {
|
||||
let actual = nu!(cwd: ".", pipeline("1 | drop 50"));
|
||||
|
||||
assert!(actual.err.contains("only_supports_this_input_type"));
|
||||
}
|
||||
|
Reference in New Issue
Block a user