forked from extern/nushell
Allow for rejecting nested record cells (#6463)
* add new function to remove data at a cellpath; allow reject to use cellpath * add tests * fmt * fix clippt * get it working properly with lists of records * fix clippy, hopefully * fix clippy, hopefully 2
This commit is contained in:
@ -107,3 +107,16 @@ fn reject_table_from_raw_eval() {
|
||||
|
||||
assert!(actual.out.contains("record 0 fields"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn reject_nested_field() {
|
||||
let actual = nu!(
|
||||
cwd: ".", pipeline(
|
||||
r#"
|
||||
{a:{b:3,c:5}} | reject a.b | debug
|
||||
"#
|
||||
)
|
||||
);
|
||||
|
||||
assert_eq!(actual.out, "{a: {c: 5}}");
|
||||
}
|
||||
|
Reference in New Issue
Block a user