From 81a3be6379198c697de2f8639dcaa1cdc9d66a53 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 12 Jun 2026 15:15:38 +0300 Subject: Fix remaining errexit masking for bm0 --- tests/cli.sh | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) (limited to 'tests/cli.sh') diff --git a/tests/cli.sh b/tests/cli.sh index 0f6470f..c747594 100755 --- a/tests/cli.sh +++ b/tests/cli.sh @@ -2113,6 +2113,7 @@ SHURIKEN_CLI_OVERRIDES=() SHURIKEN_CLI_SYNC_DESTINATIONS=() SHURIKEN_FORCE_GENERATE=no +set +e run_configured_action BASH ) @@ -2835,6 +2836,35 @@ test_refresh_splash_requires_existing_generated_blurs() { test::teardown } +test_refresh_splash_requires_matching_splash_photo() { + local config_file + local output + + test::setup + config_file="$TEST_TMPDIR/shuriken.conf" + mkdir -p \ + "$TEST_TMPDIR/incoming" \ + "$TEST_TMPDIR/dist/photos" \ + "$TEST_TMPDIR/dist/blurs" + printf 'old index\n' > "$TEST_TMPDIR/dist/index.html" + printf 'orphan photo\n' > "$TEST_TMPDIR/dist/photos/orphan.jpg" + test::write_album_config \ + "$config_file" "$TEST_TMPDIR/incoming" "$TEST_TMPDIR/dist" \ + 'Missing matching splash photo album' 40 + + output=$( + cd "$TEST_TMPDIR" + test::capture_failure_output "$TEST_SHURIKEN" --refresh-splash + ) + + test::assert_contains \ + "ERROR: No splash photos found in $TEST_TMPDIR/dist/photos" \ + "$output" + test "$(<"$TEST_TMPDIR/dist/index.html")" = 'old index' + test::assert_find_count 0 "$TEST_TMPDIR/dist" '.index.html.*' + test::teardown +} + test_refresh_splash_rejects_no_splash_config() { local config_file local output @@ -3604,8 +3634,8 @@ SHURIKEN_FAKE_CONTEXT_FILE="$context_file" export SHURIKEN_FAKE_CONTEXT_FILE serialize_template_render_context() { + false printf 'partial_context=yes\n' - return 42 } # shellcheck disable=SC2034 @@ -4493,6 +4523,9 @@ main() { test::run_case \ '--refresh-splash requires existing generated blurs' \ test_refresh_splash_requires_existing_generated_blurs + test::run_case \ + '--refresh-splash requires matching splash photo' \ + test_refresh_splash_requires_matching_splash_photo test::run_case \ '--refresh-splash rejects SPLASH_PAGE=no' \ test_refresh_splash_rejects_no_splash_config -- cgit v1.2.3