]> gitweb.hhaalo.de Git - albentohandy.git/commitdiff
add setup teardown file flac
authorBastian Dehn <hhaalo@arcor.de>
Sat, 26 Sep 2026 07:16:49 +0000 (09:16 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Sat, 26 Sep 2026 07:16:49 +0000 (09:16 +0200)
tests/flac.bats

index 41fd6b50d015be5b2cbd51d49633255a32e0a86d..b8f2919cbd82c207142230d02ebccde9c65b16b0 100755 (executable)
@@ -3,17 +3,23 @@
 setup() {
        bats_load_library 'bats-support'
        bats_load_library 'bats-assert'
-       mkdir --parents "build/tests/output"
        export METAFLAC_LOG="build/metaflac.log"
        source "src/lib/flac.sh"
 }
 
 teardown() {
-       rm --recursive --force "build"
        rm --force "$METAFLAC_LOG"
        unset METAFLAG_LOG
 }
 
+setup_file() {
+       mkdir --parents "build/tests/output"
+}
+
+teardown_file() {
+       rm --recursive --force "build"
+}
+
 # bats test_tags=flac:check_programs
 @test "failed: check programs missing metaflac" {
        command() {