]> gitweb.hhaalo.de Git - albentohandy.git/commitdiff
add test for lib not found
authorBastian Dehn <hhaalo@arcor.de>
Fri, 25 Sep 2026 07:48:39 +0000 (09:48 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Fri, 25 Sep 2026 07:48:39 +0000 (09:48 +0200)
src/albentohandy
tests/albentohandy.bats

index 5c7f90adcca8de88cdc6c1e00e53c544081e462f..25e366e01039550789cc9cb1fd74c64f058fba93 100755 (executable)
@@ -32,8 +32,13 @@ load_config()
 
 main()
 {
+       local lib="vorbis.sh"
        check_programs || return $?
        load_config || return $?
+
+       [ -f "$LIB_PATH/$lib" ] \
+               || errlog "lib $LIB_PATH/$lib not found" \
+               || return $?
 }
 
 [ "$TEST_MODE" == "ON" ] && return 0
index cb25d390b44b0f346219f2e6053f60fe63da5555..ebead4d6287963dd45396ea2e8ddd5278d2b87c7 100755 (executable)
@@ -42,4 +42,11 @@ teardown() {
 
        assert_failure
        assert_line --index 0 "❌ ERROR: missing MUSIC_PATHES in build/tests/albentohandy.conf"
+}
+
+@test "failed: lib vorbis.sh not found" {
+       run main
+
+       assert_failure
+       assert_line --index 0 "❌ ERROR: lib src/lib/vorbis.sh not found"
 }
\ No newline at end of file