]> gitweb.hhaalo.de Git - albentohandy.git/commitdiff
change tests albentohandy passed
authorBastian Dehn <hhaalo@arcor.de>
Sat, 26 Sep 2026 08:12:10 +0000 (10:12 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Sat, 26 Sep 2026 08:12:10 +0000 (10:12 +0200)
tests/albentohandy.bats

index 3eb6d4d624b5919484473ad68a0992d40183e65e..14f207afe067e30293bcf0a8fbe7480547a73645 100755 (executable)
@@ -3,14 +3,16 @@
 setup() {
        bats_load_library 'bats-support'
        bats_load_library 'bats-assert'
+       mkdir --parents "build/tests/lib"
        mkdir --parents "build/tests/music/Alben/Artist1"
+       mkdir --parents "build/tests/output"
+       touch "build/tests/lib/vorbis.sh"
        echo "Alben/Artist1" > "build/tests/albumlist"
        echo "testfile" > "build/tests/music/Alben/Artist1/file.flac"
        echo "cover" > "build/tests/music/Alben/Artist1/cover.jpg"
-       mkdir --parents "build/tests/output"
        export TEST_MODE="ON"
+       LIB_PATH="build/tests/lib"
        export CONFIG_FILE="tests/test.conf"
-       export LIB_PATH="src/lib"
        export ENCODE_COUNT=0
        export ENCODE_LOG="build/tests/encode.log"
        source src/albentohandy
@@ -100,12 +102,12 @@ teardown() {
 
 # bats test_tags=albentohandy:load_library,albentohandy:options
 @test "failed: lib vorbis.sh not found" {
-       LIB_PATH="build/tests/lib"
+       LIB_PATH="build/tests/lib1"
 
        run main
 
        assert_failure
-       assert_line --index 0 "❌ ERROR: lib build/tests/lib/vorbis.sh not found"
+       assert_line --index 0 "❌ ERROR: lib build/tests/lib1/vorbis.sh not found"
 }
 
 # bats test_tags=albentohandy:load_library,albentohandy:options
@@ -160,7 +162,7 @@ teardown() {
        run main -i "build/tests/albumlist"
 
        assert_failure
-       assert_line --index 0 "❌ ERROR: could not load library src/lib/vorbis.sh"
+       assert_line --index 0 "❌ ERROR: could not load library build/tests/lib/vorbis.sh"
 }
 
 # bats test_tags=albentohandy:input