rename update to upsert to mirror what it really does (#4859)

* rename `update` to `upsert` to mirror what it really does

* change to latest reedline and nu-ansi-term
This commit is contained in:
Darren Schroeder
2022-03-16 19:13:34 -05:00
committed by GitHub
parent ca12f39db3
commit 6700fbeed7
14 changed files with 46 additions and 53 deletions

View File

@ -6,7 +6,7 @@ fn sets_the_column() {
cwd: "tests/fixtures/formats", pipeline(
r#"
open cargo_sample.toml
| update dev-dependencies.pretty_assertions "0.7.0"
| upsert dev-dependencies.pretty_assertions "0.7.0"
| get dev-dependencies.pretty_assertions
"#
));
@ -21,7 +21,7 @@ fn sets_the_column_from_a_block_run_output() {
cwd: "tests/fixtures/formats", pipeline(
r#"
open cargo_sample.toml
| update dev-dependencies.pretty_assertions { open cargo_sample.toml | get dev-dependencies.pretty_assertions | inc --minor }
| upsert dev-dependencies.pretty_assertions { open cargo_sample.toml | get dev-dependencies.pretty_assertions | inc --minor }
| get dev-dependencies.pretty_assertions
"#
));
@ -35,7 +35,7 @@ fn sets_the_column_from_a_block_full_stream_output() {
cwd: "tests/fixtures/formats", pipeline(
r#"
wrap content
| update content { open --raw cargo_sample.toml | lines | first 5 }
| upsert content { open --raw cargo_sample.toml | lines | first 5 }
| get content.1
| str contains "nu"
"#
@ -50,7 +50,7 @@ fn sets_the_column_from_a_subexpression() {
cwd: "tests/fixtures/formats", pipeline(
r#"
wrap content
| update content (open --raw cargo_sample.toml | lines | first 5)
| upsert content (open --raw cargo_sample.toml | lines | first 5)
| get content.1
| str contains "nu"
"#

View File

@ -36,7 +36,7 @@ fn zips_two_tables() {
[ jt, 20]
]);
let actual = ($contributors | update commits {{ |i| ($i.commits + 10) }});
let actual = ($contributors | upsert commits {{ |i| ($i.commits + 10) }});
expect $actual --to-eq [[name, commits]; [andres, 20] [jt, 30]]
"#,