From: Bastian Dehn Date: Fri, 25 Sep 2026 07:40:46 +0000 (+0200) Subject: add test config X-Git-Tag: v1.0.0^2~7^2~33 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=16cb5e1d2ce0139e71eed414c0f490eb45e1ebb9;p=albentohandy.git add test config --- diff --git a/tests/albentohandy.bats b/tests/albentohandy.bats index 5366a4c..cb25d39 100755 --- a/tests/albentohandy.bats +++ b/tests/albentohandy.bats @@ -5,8 +5,7 @@ setup() { bats_load_library 'bats-assert' mkdir --parents "build/tests" export TEST_MODE="ON" - export CONFIG_FILE="build/tests/albentohandy.conf" - echo "MUSIC_PATHES=(\"build/tests\")" > "$CONFIG_FILE" + export CONFIG_FILE="tests/test.conf" source src/albentohandy } @@ -27,16 +26,17 @@ teardown() { } @test "failed: missing albumtohandy.conf" { - CONFIG_FILE="src/nothing.conf" + CONFIG_FILE="build/tests/nothing.conf" run main assert_failure - assert_line --index 0 "❌ ERROR: missing src/nothing.conf" + assert_line --index 0 "❌ ERROR: missing build/tests/nothing.conf" } @test "failed: missing MUSIC_PATHES" { - echo "" > build/tests/albentohandy.conf + CONFIG_FILE="build/tests/albentohandy.conf" + echo "" > "$CONFIG_FILE" run main diff --git a/tests/test.conf b/tests/test.conf new file mode 100644 index 0000000..a169f04 --- /dev/null +++ b/tests/test.conf @@ -0,0 +1,2 @@ +MUSIC_PATHES=("build/tests/music") +LIB_PATH="src/lib" \ No newline at end of file