mirror of
https://github.com/nushell/nushell.git
synced 2025-07-02 23:51:49 +02:00
Improve CantFindColumn and ColumnAlreadyExists errors (#7164)
* Improve CantFindColumn and ColumnAlreadyExists errors * Update tests
This commit is contained in:
@ -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]
|
||||
|
@ -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'"));
|
||||
}
|
||||
|
Reference in New Issue
Block a user