From 0d6881383d9113e5f4550e4197f6730ee0e41ef1 Mon Sep 17 00:00:00 2001 From: Jonathan Turner Date: Thu, 18 Jul 2019 13:57:58 +1200 Subject: [PATCH] Add some tests --- tests/filters_test.rs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tests/filters_test.rs b/tests/filters_test.rs index 98ec17298f..c9eb4baffa 100644 --- a/tests/filters_test.rs +++ b/tests/filters_test.rs @@ -51,6 +51,28 @@ fn can_split_by_column() { 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] fn can_filter_by_unit_size_comparison() { nu!(