From: Bastian Dehn Date: Fri, 25 Sep 2026 07:48:39 +0000 (+0200) Subject: add test for lib not found X-Git-Tag: v1.0.0^2~7^2~32 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=f78a670b8dd2b0debc2d6746075421eb964849c5;p=albentohandy.git add test for lib not found --- diff --git a/src/albentohandy b/src/albentohandy index 5c7f90a..25e366e 100755 --- a/src/albentohandy +++ b/src/albentohandy @@ -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 diff --git a/tests/albentohandy.bats b/tests/albentohandy.bats index cb25d39..ebead4d 100755 --- a/tests/albentohandy.bats +++ b/tests/albentohandy.bats @@ -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