mirror of
https://github.com/nushell/nushell.git
synced 2025-08-10 07:09:03 +02:00
Pick->Select rename. Integration tests changes. (#1725)
Pick->Select rename. Integration tests changes.
This commit is contained in:
committed by
GitHub
parent
c3efdf2689
commit
96e5fc05a3
@ -1,15 +1,17 @@
|
||||
use nu_test_support::fs::Stub::FileWithContent;
|
||||
use nu_test_support::nu;
|
||||
use nu_test_support::playground::Playground;
|
||||
use nu_test_support::{nu, nu_error};
|
||||
|
||||
#[test]
|
||||
fn can_only_apply_one() {
|
||||
let actual = nu_error!(
|
||||
let actual = nu!(
|
||||
cwd: "tests/fixtures/formats",
|
||||
"open cargo_sample.toml | first 1 | inc package.version --major --minor"
|
||||
);
|
||||
|
||||
assert!(actual.contains("Usage: inc field [--major|--minor|--patch]"));
|
||||
assert!(actual
|
||||
.err
|
||||
.contains("Usage: inc field [--major|--minor|--patch]"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
@ -28,7 +30,7 @@ fn by_one_with_field_passed() {
|
||||
"open sample.toml | inc package.edition | get package.edition | echo $it"
|
||||
);
|
||||
|
||||
assert_eq!(actual, "2019");
|
||||
assert_eq!(actual.out, "2019");
|
||||
})
|
||||
}
|
||||
|
||||
@ -48,7 +50,7 @@ fn by_one_with_no_field_passed() {
|
||||
"open sample.toml | get package.contributors | inc | echo $it"
|
||||
);
|
||||
|
||||
assert_eq!(actual, "3");
|
||||
assert_eq!(actual.out, "3");
|
||||
})
|
||||
}
|
||||
|
||||
@ -68,7 +70,7 @@ fn semversion_major_inc() {
|
||||
"open sample.toml | inc package.version -M | get package.version | echo $it"
|
||||
);
|
||||
|
||||
assert_eq!(actual, "1.0.0");
|
||||
assert_eq!(actual.out, "1.0.0");
|
||||
})
|
||||
}
|
||||
|
||||
@ -88,7 +90,7 @@ fn semversion_minor_inc() {
|
||||
"open sample.toml | inc package.version --minor | get package.version | echo $it"
|
||||
);
|
||||
|
||||
assert_eq!(actual, "0.2.0");
|
||||
assert_eq!(actual.out, "0.2.0");
|
||||
})
|
||||
}
|
||||
|
||||
@ -108,7 +110,7 @@ fn semversion_patch_inc() {
|
||||
"open sample.toml | inc package.version --patch | get package.version | echo $it"
|
||||
);
|
||||
|
||||
assert_eq!(actual, "0.1.4");
|
||||
assert_eq!(actual.out, "0.1.4");
|
||||
})
|
||||
}
|
||||
|
||||
@ -128,6 +130,6 @@ fn semversion_without_passing_field() {
|
||||
"open sample.toml | get package.version | inc --patch | echo $it"
|
||||
);
|
||||
|
||||
assert_eq!(actual, "0.1.4");
|
||||
assert_eq!(actual.out, "0.1.4");
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user