]> git.draconx.ca Git - liblbx.git/blobdiff - tests/util/test-init.sh
tests: Migrate remaining regress.zsh tests to TAP.
[liblbx.git] / tests / util / test-init.sh
index 5cd161a2d6d8ddfe4d8caa22b3a49d59bfb5b430..52625c0d199f86f66f14957a42cb4ffdbfc68e3a 100644 (file)
@@ -114,6 +114,23 @@ dx_pam_header()
                END { exit ret }' ${1+"$@"}
 }
 
+dx_check_pam_md5_() {
+       dx_pam_header "$1" > "$1.sh" || return
+       . "./$1.sh" || return
+
+       tail -n +"$ENDHDR" "$1" > "$1.px" || return
+       echo "$2  $1.px" > "$1.md5" || return
+       $MD5SUM -c "$1.md5"
+}
+
+dx_check_pam_md5() {
+       if $HAVE_MD5SUM; then
+               command_ok_ "$1" dx_check_pam_md5_ "$1" "$2"
+       else
+               skip_ "$1"
+       fi
+}
+
 # Variables to run the LBX tools.  Default to the build tree, but can also be
 # set explicitly to test installed tools.
 : "${LBXTOOL=$builddir/lbxtool$EXEEXT}"