]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
change postinst dll.conf for test
authorBastian Dehn <hhaalo@arcor.de>
Thu, 16 Jul 2026 17:49:53 +0000 (19:49 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Thu, 16 Jul 2026 17:49:53 +0000 (19:49 +0200)
src/debian/postinst
tests/postinst.bats

index 96c8ea565122bfd412e94e20ba3b7a55b813924e..48ab3b4f910f7d3e85ea0e28f668229f3216bbac 100755 (executable)
@@ -15,7 +15,7 @@ add_entry()
 
        grep --silent "$entry" "$DLLCONFIG" && return 0
        echo "$entry" >> "$DLLCONFIG"
-       echo "add kds_s2000w_net to ../build/dll.conf"
+       echo "add kds_s2000w_net to $DLLCONFIG"
 }
 
 main()
index 7d78fbfb59a852fbb54c90bed328a2dc70729df2..1d1352c347be0cb3e7e506aba968e18ccf62bd9f 100755 (executable)
@@ -4,11 +4,11 @@ setup() {
        bats_load_library bats-support
        bats_load_library bats-assert
        mkdir --parents ../build
-       touch ../build/dll.conf
+       touch ../build/dllpostinst.conf
 }
 
 teardown() {
-       rm -rf ../build/dll.conf
+       rm -rf ../build/dllpostinst.conf
 }
 
 @test "ignore file does not exists" {
@@ -22,27 +22,27 @@ teardown() {
 }
 
 @test "add entry kds_s2000w_net dll.conf" {
-       export DLLCONFIG="../build/dll.conf"
+       export DLLCONFIG="../build/dllpostinst.conf"
 
        run ../src/debian/postinst
 
        assert_success
-       assert_line --index 0 "found ../build/dll.conf"
-       assert_line --index 1 "add kds_s2000w_net to ../build/dll.conf"
-       assert_equal "$(cat ../build/dll.conf)" "kds_s2000w_net"
-       assert_equal "$(cat ../build/dll.conf | wc --lines)" "1"
+       assert_line --index 0 "found ../build/dllpostinst.conf"
+       assert_line --index 1 "add kds_s2000w_net to ../build/dllpostinst.conf"
+       assert_equal "$(cat ../build/dllpostinst.conf)" "kds_s2000w_net"
+       assert_equal "$(cat ../build/dllpostinst.conf | wc --lines)" "1"
        unset DLLCONFIG
 }
 
 @test "entry exists in dll.conf do nothing" {
-       export DLLCONFIG="../build/dll.conf"
+       export DLLCONFIG="../build/dllpostinst.conf"
 
        run ../src/debian/postinst
        run ../src/debian/postinst
 
        assert_success
-       assert_output "found ../build/dll.conf"
-       assert_equal "$(cat ../build/dll.conf)" "kds_s2000w_net"
-       assert_equal "$(cat ../build/dll.conf | wc --lines)" "1"
+       assert_output "found ../build/dllpostinst.conf"
+       assert_equal "$(cat ../build/dllpostinst.conf)" "kds_s2000w_net"
+       assert_equal "$(cat ../build/dllpostinst.conf | wc --lines)" "1"
        unset DLLCONFIG
 }
\ No newline at end of file