diff options
| author | Paul Buetow <paul@buetow.org> | 2026-06-03 19:19:39 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-06-03 19:19:39 +0300 |
| commit | 77e65bdbc636e6c52353454d416cf03f42a74f6c (patch) | |
| tree | 8bb0a7ce23bf00343201a2db51d503a9b266172e /tests/cli.sh | |
| parent | 32d58b2a62840b58d38d070599cdd40c8ee2e7de (diff) | |
Fix no-extension image filtering for task 2j0
Diffstat (limited to 'tests/cli.sh')
| -rwxr-xr-x | tests/cli.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/cli.sh b/tests/cli.sh index bcad987..1ed52b1 100755 --- a/tests/cli.sh +++ b/tests/cli.sh @@ -523,10 +523,13 @@ test_generate_ignores_unsupported_incoming_files_with_warning() { "$TEST_TMPDIR/incoming/04-photo.webp" "$TEST_IMAGEMAGICK" -size 160x90 xc:red \ "$TEST_TMPDIR/incoming/05-photo.gif" + printf 'extension-looking basename\n' > "$TEST_TMPDIR/incoming/jpg" printf 'notes\n' > "$TEST_TMPDIR/incoming/notes.txt" printf '# album notes\n' > "$TEST_TMPDIR/incoming/README.md" mkdir -p "$TEST_TMPDIR/dist/photos" printf 'stale cached unsupported file\n' \ + > "$TEST_TMPDIR/dist/photos/jpg" + printf 'stale cached unsupported file\n' \ > "$TEST_TMPDIR/dist/photos/notes.txt" printf 'stale cached unsupported file\n' \ > "$TEST_TMPDIR/dist/photos/README.md" @@ -544,6 +547,7 @@ test_generate_ignores_unsupported_incoming_files_with_warning() { test::assert_file_exists "$TEST_TMPDIR/dist/photos/03-photo.png" test::assert_file_exists "$TEST_TMPDIR/dist/photos/04-photo.webp" test::assert_file_exists "$TEST_TMPDIR/dist/photos/05-photo.gif" + test::assert_path_absent "$TEST_TMPDIR/dist/photos/jpg" test::assert_path_absent "$TEST_TMPDIR/dist/photos/notes.txt" test::assert_path_absent "$TEST_TMPDIR/dist/photos/README.md" test::assert_contains \ @@ -552,8 +556,12 @@ test_generate_ignores_unsupported_incoming_files_with_warning() { test::assert_contains \ 'WARNING: Ignoring unsupported incoming file: notes.txt' \ "$output" + test::assert_contains \ + 'WARNING: Ignoring unsupported incoming file: jpg' \ + "$output" test::assert_not_contains 'Processing notes.txt' "$output" test::assert_not_contains 'Processing README.md' "$output" + test::assert_not_contains 'Processing jpg' "$output" python3 - "$TEST_TMPDIR/dist/photoalbum.json" <<'PY' import json |
