From f78a670b8dd2b0debc2d6746075421eb964849c5 Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Fri, 25 Sep 2026 09:48:39 +0200 Subject: [PATCH] add test for lib not found --- src/albentohandy | 5 +++++ tests/albentohandy.bats | 7 +++++++ 2 files changed, 12 insertions(+) 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 -- 2.47.3