make sure no duplicate records exists during eval and merge (#5633)

This commit is contained in:
WindSoilder
2022-05-26 08:10:31 +08:00
committed by GitHub
parent 8e98df8b28
commit 9602e82029
3 changed files with 77 additions and 10 deletions

View File

@ -81,3 +81,29 @@ fn ignores_duplicate_columns_rejected() {
assert_eq!(actual.out, "last name");
}
#[test]
fn reject_record_from_raw_eval() {
let actual = nu!(
cwd: ".", pipeline(
r#"
{"a": 3, "a": 4} | reject a | describe
"#
)
);
assert!(actual.out.contains("record<>"));
}
#[test]
fn reject_table_from_raw_eval() {
let actual = nu!(
cwd: ".", pipeline(
r#"
[{"a": 3, "a": 4}] | reject a
"#
)
);
assert!(actual.out.contains("record 0 fields"));
}