Add some tests

This commit is contained in:
Jonathan Turner 2019-07-18 13:57:58 +12:00
parent e66c687da6
commit 0d6881383d

View file

@ -51,6 +51,28 @@ fn can_split_by_column() {
assert_eq!(output, "name"); assert_eq!(output, "name");
} }
#[test]
fn can_inc_version() {
nu!(
output,
cwd("tests/fixtures/formats"),
"open cargo_sample.toml | inc package.version --minor | get package.version | echo $it"
);
assert_eq!(output, "0.2.0");
}
#[test]
fn can_inc_field() {
nu!(
output,
cwd("tests/fixtures/formats"),
"open cargo_sample.toml | inc package.edition | get package.edition | echo $it"
);
assert_eq!(output, "2019");
}
#[test] #[test]
fn can_filter_by_unit_size_comparison() { fn can_filter_by_unit_size_comparison() {
nu!( nu!(