From 16cb5e1d2ce0139e71eed414c0f490eb45e1ebb9 Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Fri, 25 Sep 2026 09:40:46 +0200 Subject: [PATCH] add test config --- tests/albentohandy.bats | 10 +++++----- tests/test.conf | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 tests/test.conf 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 -- 2.47.3