2019-12-17 18:54:39 +00:00
|
|
|
use nu_test_support::{nu, pipeline};
|
2019-12-15 16:15:06 +00:00
|
|
|
|
|
|
|
#[test]
|
2020-04-30 04:18:24 +00:00
|
|
|
fn sets_the_column() {
|
2019-12-15 16:15:06 +00:00
|
|
|
let actual = nu!(
|
|
|
|
cwd: "tests/fixtures/formats", pipeline(
|
|
|
|
r#"
|
|
|
|
open cargo_sample.toml
|
2020-05-07 05:33:30 +00:00
|
|
|
| update dev-dependencies.pretty_assertions "0.7.0"
|
2019-12-15 16:15:06 +00:00
|
|
|
| get dev-dependencies.pretty_assertions
|
|
|
|
| echo $it
|
|
|
|
"#
|
|
|
|
));
|
|
|
|
|
2020-04-30 04:18:24 +00:00
|
|
|
assert_eq!(actual, "0.7.0");
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn sets_the_column_from_a_block_run_output() {
|
|
|
|
let actual = nu!(
|
|
|
|
cwd: "tests/fixtures/formats", pipeline(
|
|
|
|
r#"
|
|
|
|
open cargo_sample.toml
|
2020-05-07 05:33:30 +00:00
|
|
|
| update dev-dependencies.pretty_assertions { open cargo_sample.toml | get dev-dependencies.pretty_assertions | inc --minor }
|
2020-04-30 04:18:24 +00:00
|
|
|
| get dev-dependencies.pretty_assertions
|
|
|
|
| echo $it
|
|
|
|
"#
|
|
|
|
));
|
|
|
|
|
|
|
|
assert_eq!(actual, "0.7.0");
|
2019-12-15 16:15:06 +00:00
|
|
|
}
|