X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=t%2Ft0003-writer-init-error-path.sh;fp=t%2Ft0003-writer-init-error-path.sh;h=15f1dd8e53cff5d4a811c5ea9efb0b2e25752049;hp=0000000000000000000000000000000000000000;hb=87d7882d3bd2e0a0432a2f388050fbbbcfe9fa42;hpb=c7250fb279af132333266af36e19c156dd84eca1 diff --git a/t/t0003-writer-init-error-path.sh b/t/t0003-writer-init-error-path.sh new file mode 100755 index 00000000..15f1dd8e --- /dev/null +++ b/t/t0003-writer-init-error-path.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +test_description='Check if alsa_init() failures are handled gracefully. + +Older parasslash versions contained a bug which caused para_write and para_audiod +to abort if the alsa/oss device could not be opened. This test makes sure we +will not introduce the same bug again.' + +. ${0%/*}/test-lib.sh + +for i in alsa oss; do + test_require_objects "${i}_write" + missing_objects="$result" + if [[ -n "$missing_objects" ]]; then + test_skip "$i" "missing object(s): $missing_objects" + continue + fi + test_expect_failure "$i" " + head -c 100 /dev/zero | $PARA_WRITE -w '$i -d /dev/non_existent' + " +done +test_done