diff options
author | Sebastian Thiel <sthiel@thoughtworks.com> | 2019-06-01 20:09:30 +0530 |
---|---|---|
committer | Sebastian Thiel <sthiel@thoughtworks.com> | 2019-06-01 20:14:31 +0530 |
commit | ae0182f09c0e2c3c77298cb431421cbdc64c0fa8 (patch) | |
tree | dad6439c32112bc69ddcf510693c68dc69326e42 /tests | |
parent | a53c2acb65457df740f3605124b9e42d363897de (diff) |
Simplified handling of 'no paths given' casev1.1.0
Diffstat (limited to 'tests')
-rw-r--r-- | tests/snapshots/success-bytes-binary | 7 | ||||
-rw-r--r-- | tests/snapshots/success-bytes-only | 7 | ||||
-rw-r--r-- | tests/snapshots/success-no-arguments | 7 | ||||
-rw-r--r-- | tests/snapshots/success-no-arguments-no-sort | 6 | ||||
-rwxr-xr-x | tests/stateless-journey.sh | 25 |
5 files changed, 44 insertions, 8 deletions
diff --git a/tests/snapshots/success-bytes-binary b/tests/snapshots/success-bytes-binary index dc4db03..acc26fc 100644 --- a/tests/snapshots/success-bytes-binary +++ b/tests/snapshots/success-bytes-binary @@ -1 +1,6 @@ - 1.20 MiB .
\ No newline at end of file + 0.00 B b.empty + 256.00 B a + 256.00 B c.lnk + 666.00 B .hidden.666 + 1.20 MiB dir + 1.20 MiB total
\ No newline at end of file diff --git a/tests/snapshots/success-bytes-only b/tests/snapshots/success-bytes-only index 85a7d8a..b83f090 100644 --- a/tests/snapshots/success-bytes-only +++ b/tests/snapshots/success-bytes-only @@ -1 +1,6 @@ - 1258947 b .
\ No newline at end of file + 0 b b.empty + 256 b a + 256 b c.lnk + 666 b .hidden.666 + 1258024 b dir + 1259202 b total
\ No newline at end of file diff --git a/tests/snapshots/success-no-arguments b/tests/snapshots/success-no-arguments index 51714b5..e85cf4b 100644 --- a/tests/snapshots/success-no-arguments +++ b/tests/snapshots/success-no-arguments @@ -1 +1,6 @@ - 1.26 MB .
\ No newline at end of file + 0.00 B b.empty + 256.00 B a + 256.00 B c.lnk + 666.00 B .hidden.666 + 1.26 MB dir + 1.26 MB total
\ No newline at end of file diff --git a/tests/snapshots/success-no-arguments-no-sort b/tests/snapshots/success-no-arguments-no-sort new file mode 100644 index 0000000..42f24a4 --- /dev/null +++ b/tests/snapshots/success-no-arguments-no-sort @@ -0,0 +1,6 @@ + 666.00 B .hidden.666 + 256.00 B a + 0.00 B b.empty + 256.00 B c.lnk + 1.26 MB dir + 1.26 MB total
\ No newline at end of file diff --git a/tests/stateless-journey.sh b/tests/stateless-journey.sh index 5d444f7..5625035 100755 --- a/tests/stateless-journey.sh +++ b/tests/stateless-journey.sh @@ -18,12 +18,27 @@ WITH_FAILURE=1 cp -R "$fixtures/sample-01/" . (with "no arguments" (with "no given path" - it "produces a human-readable (metric) aggregate of the current directory, without total" && { - WITH_SNAPSHOT="$snapshot/success-no-arguments" \ - expect_run ${SUCCESSFULLY} "$exe" - } + (with "no subcommand" + it "produces a human-readable (metric) aggregate of everything within the current directory, with total" && { + WITH_SNAPSHOT="$snapshot/success-no-arguments" \ + expect_run ${SUCCESSFULLY} "$exe" + } + ) + (with "the aggregate sub-command" + (with "no sorting option" + it "produces a human-readable (metric) aggregate of everything within the current directory, with total" && { + WITH_SNAPSHOT="$snapshot/success-no-arguments" \ + expect_run ${SUCCESSFULLY} "$exe" aggregate + } + ) + (with "sorting disabled" + it "produces a human-readable (metric) aggregate of everything within the current directory, alphabetically sorted, with total" && { + WITH_SNAPSHOT="$snapshot/success-no-arguments-no-sort" \ + expect_run ${SUCCESSFULLY} "$exe" aggregate --no-sort + } + ) + ) ) - ls (with "multiple given paths" (when "specifying the 'aggregate' subcommand" (with "no option to adjust the total" |