]> gitweb.hhaalo.de Git - albentohandy.git/commitdiff
add test encode failed
authorBastian Dehn <hhaalo@arcor.de>
Fri, 25 Sep 2026 10:59:25 +0000 (12:59 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Fri, 25 Sep 2026 10:59:25 +0000 (12:59 +0200)
src/albentohandy
tests/albentohandy.bats

index 5f96cc2451303c88c7a03eeee72aae81f2c54ab9..f76219e0938c2c5fed23bb7ef4d2fffd4d4a96ab 100755 (executable)
@@ -100,7 +100,9 @@ main()
 
        mkdir --parents "$OUTPUT_PATH" || return $?
        make_symlinks_to_work "$albumlist" || return $?
-       encode "$OUTPUT_PATH"
+       encode "$OUTPUT_PATH" \
+               || errlog "could not encode $OUTPUT_PATH" \
+               || return $?
 }
 
 [ "$TEST_MODE" == "ON" ] && return 0
index 1967144293ed5dadc28d4497583ef1c2ab110201..9f44ed967138bc4b0135253041f052b2b99f9227 100755 (executable)
@@ -215,4 +215,15 @@ teardown() {
        assert_success
        assert_equal "$(awk 'NR==1 {print; exit}' "$ENCODE_LOG")" "1"
        assert_equal "$(awk 'NR==2 {print; exit}' "$ENCODE_LOG")" "build/tests/output"
+}
+
+@test "failed: could not encode" {
+       encode() {
+               return 1
+       }
+
+       run main -i "build/tests/albumlist"
+
+       assert_failure
+       assert_line --index 0 "❌ ERROR: could not encode build/tests/output"
 }
\ No newline at end of file