From 192460e5bc72781be1d238912c5d590bfed706cf Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Mon, 11 Dec 2023 12:33:44 +0100 Subject: fix: single files will not cause IO error (#194) Running `dua ` will once again provide size information about that filename. --- tests/snapshots/success-single-file | 1 + tests/stateless-journey.sh | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 tests/snapshots/success-single-file (limited to 'tests') 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" \ -- cgit v1.2.3