forked from extern/nushell
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:
@ -5,12 +5,19 @@ fn binary_skip() {
|
||||
let actual = nu!(
|
||||
cwd: "tests/fixtures/formats", pipeline(
|
||||
r#"
|
||||
open sample_data.ods --raw |
|
||||
skip 2 |
|
||||
take 2 |
|
||||
open sample_data.ods --raw |
|
||||
skip 2 |
|
||||
take 2 |
|
||||
into int
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual.out, "772");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn fail_on_non_iterator() {
|
||||
let actual = nu!(cwd: ".", pipeline("1 | skip 2"));
|
||||
|
||||
assert!(actual.err.contains("only_supports_this_input_type"));
|
||||
}
|
||||
|
Reference in New Issue
Block a user