summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSebastian Thiel <sebastian.thiel@icloud.com>2023-12-11 12:33:44 +0100
committerSebastian Thiel <sebastian.thiel@icloud.com>2023-12-11 12:33:44 +0100
commit192460e5bc72781be1d238912c5d590bfed706cf (patch)
tree65aa21b9042b0998d6a02cf5742da9bf134bd1ce /tests
parent2da2e2e7d264d19cc67ccee6bd8658f7a87901c1 (diff)
fix: single files will not cause IO error (#194)
Running `dua <filename>` will once again provide size information about that filename.
Diffstat (limited to 'tests')
-rw-r--r--tests/snapshots/success-single-file1
-rwxr-xr-xtests/stateless-journey.sh6
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/snapshots/success-single-file b/tests/snapshots/success-single-file
new file mode 100644
index 0000000..8321cbf
--- /dev/null
+++ b/tests/snapshots/success-single-file
@@ -0,0 +1 @@
+ 4.10 KB a \ No newline at end of file
diff --git a/tests/stateless-journey.sh b/tests/stateless-journey.sh
index 37a32c2..2557f3a 100755
--- a/tests/stateless-journey.sh
+++ b/tests/stateless-journey.sh
@@ -31,6 +31,12 @@ WITH_FAILURE=1
expect_run ${SUCCESSFULLY} "$exe" aggregate
}
)
+ (with "a single file argument"
+ it "produces a human-readable (metric) size display of that file" && {
+ WITH_SNAPSHOT="$snapshot/success-single-file" \
+ expect_run ${SUCCESSFULLY} "$exe" aggregate a
+ }
+ )
(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" \