From 75b3eed98f14d918f474f73caa3cdedd5af927ad Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Thu, 12 May 2022 08:16:57 +0800 Subject: fix: broken or non-existing root path will still print the valid results. (#124) Previously it would fail completely without printing anything. --- .../failure-no-arguments-multiple-input-paths-some-not-existing | 7 ++++++- .../success-no-arguments-multiple-input-paths-one-broken-link | 7 ++++++- tests/stateless-journey.sh | 1 + 3 files changed, 13 insertions(+), 2 deletions(-) (limited to 'tests') 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 59f080a..30c4a97 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 +1,6 @@ -Error: No such file or directory (os error 2) \ No newline at end of file + 0 B foo <1 IO Error> + 0 B bar <1 IO Error> + 0 B baz <1 IO Error> + 1.28 MB . + 1.28 MB . + 2.56 MB total <3 IO Errors> \ No newline at end of file diff --git a/tests/snapshots/success-no-arguments-multiple-input-paths-one-broken-link b/tests/snapshots/success-no-arguments-multiple-input-paths-one-broken-link index 59f080a..4c99a22 100644 --- a/tests/snapshots/success-no-arguments-multiple-input-paths-one-broken-link +++ b/tests/snapshots/success-no-arguments-multiple-input-paths-one-broken-link @@ -1 +1,6 @@ -Error: No such file or directory (os error 2) \ No newline at end of file + 0 B broken-link <1 IO Error> + 258.05 KB ./dir/sub + 1.27 MB dir + 1.28 MB . + 2.81 MB total <1 IO Error> +Statistics { entries_traversed: 25, smallest_file_in_bytes: 0, largest_file_in_bytes: 1003520 } \ No newline at end of file diff --git a/tests/stateless-journey.sh b/tests/stateless-journey.sh index bc6d0c9..37a32c2 100755 --- a/tests/stateless-journey.sh +++ b/tests/stateless-journey.sh @@ -71,6 +71,7 @@ WITH_FAILURE=1 WITH_SNAPSHOT="$snapshot/success-no-arguments-multiple-input-paths-one-broken-link" \ expect_run ${WITH_FAILURE} "$exe" aggregate --stats . dir broken-link ./dir/sub } + rm broken-link ) ) (when "specifying no subcommand" -- cgit v1.2.3