mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 14:06:40 +02:00
Return errors on unexpected inputs to take
and first
(#7123)
* Fix `take` behaviour for unexpected input types * Fix `first` behaviour for unexpected input types * Fix copy paste mistake
This commit is contained in:
@ -7,7 +7,7 @@ fn chooses_highest_increment_if_given_more_than_one() {
|
||||
let actual = nu_with_plugins!(
|
||||
cwd: "tests/fixtures/formats",
|
||||
plugin: ("nu_plugin_inc"),
|
||||
"open cargo_sample.toml | first | inc package.version --major --minor | get package.version"
|
||||
"open cargo_sample.toml | inc package.version --major --minor | get package.version"
|
||||
);
|
||||
|
||||
assert_eq!(actual.out, "1.0.0");
|
||||
@ -16,7 +16,7 @@ fn chooses_highest_increment_if_given_more_than_one() {
|
||||
cwd: "tests/fixtures/formats",
|
||||
plugin: ("nu_plugin_inc"),
|
||||
// Regardless of order of arguments
|
||||
"open cargo_sample.toml | first | inc package.version --minor --major | get package.version"
|
||||
"open cargo_sample.toml | inc package.version --minor --major | get package.version"
|
||||
);
|
||||
|
||||
assert_eq!(actual.out, "1.0.0");
|
||||
|
Reference in New Issue
Block a user