summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSebastian Thiel <sthiel@thoughtworks.com>2019-06-01 14:27:52 +0530
committerSebastian Thiel <sthiel@thoughtworks.com>2019-06-01 14:27:52 +0530
commitf8c3ba29134af08ea7b70b4fe3951307c6be6e3a (patch)
treec34182c60235def2f99ca2b92bc42e7da0d046ba /tests
parente7da7843ad7894a3560b4d70076a74798404da94 (diff)
Sort by size in bytes by default; can be turned off for immediate feedback
Diffstat (limited to 'tests')
-rw-r--r--tests/snapshots/failure-no-arguments-multiple-input-paths-some-not-existing4
-rw-r--r--tests/snapshots/success-no-arguments-multiple-input-paths6
-rw-r--r--tests/snapshots/success-no-arguments-multiple-input-paths-no-sort6
-rw-r--r--tests/snapshots/success-no-arguments-multiple-input-paths-no-total6
-rwxr-xr-xtests/stateless-journey.sh14
5 files changed, 24 insertions, 12 deletions
diff --git a/tests/snapshots/failure-no-arguments-multiple-input-paths-some-not-existing b/tests/snapshots/failure-no-arguments-multiple-input-paths-some-not-existing
index 4c9d9a2..6166323 100644
--- a/tests/snapshots/failure-no-arguments-multiple-input-paths-some-not-existing
+++ b/tests/snapshots/failure-no-arguments-multiple-input-paths-some-not-existing
@@ -1,6 +1,6 @@
- 1.26 MB .
- 1.26 MB .
0.00 B foo <1 IO Error(s)>
0.00 B bar <1 IO Error(s)>
0.00 B baz <1 IO Error(s)>
+ 1.26 MB .
+ 1.26 MB .
2.52 MB total <3 IO Error(s)> \ No newline at end of file
diff --git a/tests/snapshots/success-no-arguments-multiple-input-paths b/tests/snapshots/success-no-arguments-multiple-input-paths
index 1725633..f157e57 100644
--- a/tests/snapshots/success-no-arguments-multiple-input-paths
+++ b/tests/snapshots/success-no-arguments-multiple-input-paths
@@ -1,6 +1,6 @@
- 1.26 MB .
- 1.26 MB .
+ 256.00 KB ./dir/sub
1.26 MB dir
1.26 MB ./dir/
- 256.00 KB ./dir/sub
+ 1.26 MB .
+ 1.26 MB .
5.29 MB total \ No newline at end of file
diff --git a/tests/snapshots/success-no-arguments-multiple-input-paths-no-sort b/tests/snapshots/success-no-arguments-multiple-input-paths-no-sort
new file mode 100644
index 0000000..1725633
--- /dev/null
+++ b/tests/snapshots/success-no-arguments-multiple-input-paths-no-sort
@@ -0,0 +1,6 @@
+ 1.26 MB .
+ 1.26 MB .
+ 1.26 MB dir
+ 1.26 MB ./dir/
+ 256.00 KB ./dir/sub
+ 5.29 MB total \ No newline at end of file
diff --git a/tests/snapshots/success-no-arguments-multiple-input-paths-no-total b/tests/snapshots/success-no-arguments-multiple-input-paths-no-total
index 2c1725a..2427939 100644
--- a/tests/snapshots/success-no-arguments-multiple-input-paths-no-total
+++ b/tests/snapshots/success-no-arguments-multiple-input-paths-no-total
@@ -1,5 +1,5 @@
- 1.26 MB .
- 1.26 MB .
+ 256.00 KB ./dir/sub
1.26 MB dir
1.26 MB ./dir/
- 256.00 KB ./dir/sub \ No newline at end of file
+ 1.26 MB .
+ 1.26 MB . \ No newline at end of file
diff --git a/tests/stateless-journey.sh b/tests/stateless-journey.sh
index bd31903..1cd0fa9 100755
--- a/tests/stateless-journey.sh
+++ b/tests/stateless-journey.sh
@@ -27,26 +27,32 @@ WITH_FAILURE=1
(with "multiple given paths"
(when "specifying the 'aggregate' subcommand"
(with "no option to adjust the total"
- it "produces a human-readable (metric) aggregate of the current directory, with total" && {
+ it "produces a human-readable aggregate, with total" && {
WITH_SNAPSHOT="$snapshot/success-no-arguments-multiple-input-paths" \
expect_run ${SUCCESSFULLY} "$exe" aggregate . . dir ./dir/ ./dir/sub
}
)
(with "the --no-total option set"
- it "produces a human-readable (metric) aggregate of the current directory, without total" && {
+ it "produces a human-readable aggregate, without total" && {
WITH_SNAPSHOT="$snapshot/success-no-arguments-multiple-input-paths-no-total" \
expect_run ${SUCCESSFULLY} "$exe" aggregate --no-total . . dir ./dir/ ./dir/sub
}
)
+ (with "the --no-sort option set"
+ it "produces a human-readable aggregate, sorted in order specified on the command-line" && {
+ WITH_SNAPSHOT="$snapshot/success-no-arguments-multiple-input-paths-no-sort" \
+ expect_run ${SUCCESSFULLY} "$exe" aggregate --no-sort . . dir ./dir/ ./dir/sub
+ }
+ )
)
(when "specifying no subcommand"
- it "produces a human-readable (metric) aggregate of the current directory, with total" && {
+ it "produces a human-readable aggregate" && {
WITH_SNAPSHOT="$snapshot/success-no-arguments-multiple-input-paths" \
expect_run ${SUCCESSFULLY} "$exe" . . dir ./dir/ ./dir/sub
}
)
(when "specifying no subcommand and some of the directories don't exist"
- it "produces a human-readable (metric) aggregate of the current directory, with total" && {
+ it "produces a human-readable aggregate, with the number of errors per root" && {
WITH_SNAPSHOT="$snapshot/failure-no-arguments-multiple-input-paths-some-not-existing" \
expect_run ${WITH_FAILURE} "$exe" . . foo bar baz
}