summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSebastian Thiel <sthiel@thoughtworks.com>2019-06-01 12:18:05 +0530
committerSebastian Thiel <sthiel@thoughtworks.com>2019-06-01 12:18:05 +0530
commit04ce0c9312fb5e290d6fbaed8e9427bec3f3e1c6 (patch)
tree17d9b104f81649ab2644e2dea9431f0b6a10b933 /tests
parent7dc718bd03f7f669638d87b4c5fee67700f045ca (diff)
Compute the total if there are more than one paths
Diffstat (limited to 'tests')
-rw-r--r--tests/snapshots/success-no-arguments-multiple-input-paths6
-rwxr-xr-xtests/stateless-journey.sh19
2 files changed, 20 insertions, 5 deletions
diff --git a/tests/snapshots/success-no-arguments-multiple-input-paths b/tests/snapshots/success-no-arguments-multiple-input-paths
new file mode 100644
index 0000000..6b8938e
--- /dev/null
+++ b/tests/snapshots/success-no-arguments-multiple-input-paths
@@ -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/stateless-journey.sh b/tests/stateless-journey.sh
index d692b14..60f0586 100755
--- a/tests/stateless-journey.sh
+++ b/tests/stateless-journey.sh
@@ -14,12 +14,21 @@ SUCCESSFULLY=0
(with "a sample directory"
(sandbox
- cp -R "$fixtures/sample-01" .
+ cp -R "$fixtures/sample-01/" .
(with "no arguments"
- 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 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"
+ }
+ )
+ ls
+ (with "multiple given paths"
+ it "produces a human-readable (metric) aggregate of the current directory, with total" && {
+ WITH_SNAPSHOT="$snapshot/success-no-arguments-multiple-input-paths" \
+ expect_run ${SUCCESSFULLY} "$exe" a . . dir ./dir/ ./dir/sub
+ }
+ )
)
(with "the byte format set"