mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 22:50:14 +02:00
make take
behave like first
(#6893)
* fix take_1 behavior * fix test case * simplify code * reverse back for first command * fix example * make arg required * add test * fix test message
This commit is contained in:
@ -29,3 +29,15 @@ fn rows() {
|
||||
assert_eq!(actual.out, "4");
|
||||
})
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn rows_with_no_arguments_should_lead_to_error() {
|
||||
Playground::setup("take_test_2", |dirs, _sandbox| {
|
||||
let actual = nu!(
|
||||
cwd: dirs.test(), pipeline(
|
||||
r#"[1 2 3] | take"#
|
||||
));
|
||||
|
||||
assert!(actual.err.contains("missing_positional"));
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user