Improve CantFindColumn and ColumnAlreadyExists errors (#7164)

* Improve CantFindColumn and ColumnAlreadyExists errors

* Update tests
This commit is contained in:
Leon
2022-11-20 03:35:55 +10:00
committed by GitHub
parent 41f72b1236
commit 4b83a2d27a
8 changed files with 131 additions and 37 deletions

View File

@ -24,7 +24,9 @@ fn insert_the_column_conflict() {
"#
));
assert!(actual.err.contains("column already exists"));
assert!(actual
.err
.contains("column 'pretty_assertions' already exists"));
}
#[test]

View File

@ -95,3 +95,13 @@ fn update_past_end_list() {
assert!(actual.err.contains("too large"));
}
#[test]
fn update_nonexistent_column() {
let actual = nu!(
cwd: ".", pipeline(
r#"{a:1} | update b 2"#
));
assert!(actual.err.contains("cannot find column 'b'"));
}