#!/usr/bin/env bash test_description='Check if alsa_init() failures are handled gracefully. Older paraslash 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.bash 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