mirror of
https://github.com/nushell/nushell.git
synced 2025-07-01 07:00:37 +02:00
Adds drop
number of rows command (#1663)
* Fix access to columns with quoted names * Add a drop number of rows from end of table
This commit is contained in:
11
crates/nu-cli/tests/commands/drop.rs
Normal file
11
crates/nu-cli/tests/commands/drop.rs
Normal file
@ -0,0 +1,11 @@
|
||||
use nu_test_support::nu;
|
||||
|
||||
#[test]
|
||||
fn drop_rows() {
|
||||
let actual = nu!(
|
||||
cwd: "tests/fixtures/formats",
|
||||
r#"echo '[{"foo": 3}, {"foo": 8}, {"foo": 4}]' | from-json | drop 2 | get foo | sum | echo $it"#
|
||||
);
|
||||
|
||||
assert_eq!(actual, "3");
|
||||
}
|
@ -5,6 +5,7 @@ mod cd;
|
||||
mod compact;
|
||||
mod cp;
|
||||
mod default;
|
||||
mod drop;
|
||||
mod each;
|
||||
mod edit;
|
||||
mod enter;
|
||||
|
Reference in New Issue
Block a user