Lines Matching defs:err_exit

33 function err_exit
39 alias err_exit='err_exit $LINENO'
101 # quote input string but use single-backslash that "err_exit" prints
111 # quote input string but use double-backslash that "err_exit" prints
124 builtin mktemp || err_exit "mktemp builtin not found"
125 builtin rm || err_exit "rm builtin not found"
126 builtin tail || err_exit "tail builtin not found"
133 tmpdir="$(mktemp -t -d "test_sun_solaris_builtin_tail.XXXXXXXX")" || err_exit "Cannot create temporary directory"
135 cd "${tmpdir}" || { err_exit "cd ${tmpdir} failed." ; exit $((Errors)) ; }
296 ) || err_exit "test ${tc.name}/${argv_variants}: command failed with exit code $?"
298 [[ "${output}" == "${tc.expected_output}" ]] || err_exit "test ${tc.name}/${argv_variants}: Expected $(doublebackslashquote "${tc.expected_output}"), got $(doublebackslashquote "${output}")"
304 [[ "$(tail -r </etc/profile | rev -l)" == "$( cat /etc/profile )" ]] || err_exit "'tail -r </etc/profile | rev -l' output does not match 'cat /etc/profile'"
309 (( $? == 2 )) || err_exit "expected exit code 2 for unsupported long option, got $?"
336 err_exit "test_tail_fifo_1: # tail hung (not expected)"
340 wait || err_exit "tail child returned non-zero exit code=$?"
342 [[ "$(cat tailout)" == $'11\n12\n13\n14\n15\n16\n17\n18\n19\n20' ]] || err_exit "test_tail_fifo_1: Expected $(doublebackslashquote '11\n12\n13\n14\n15\n16\n17\n18\n19\n20'), got $(doublebackslashquote "$(cat tailout)")"
367 [[ "$(cat tailout)" == $'5\n6\n7\n8\n9\n10\n11\n12\n13\n14' ]] || err_exit "test_tail_fifo_2: Expected $(doublebackslashquote $'5\n6\n7\n8\n9\n10\n11\n12\n13\n14'), got $(doublebackslashquote "$(cat tailout)")"
376 err_exit "test_tail_fifo_2: # tail exit with return code $? (not expected)"
380 wait || err_exit "tail child returned non-zero exit code=$?"
382 [[ "$(cat tailout)" == $'5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15' ]] || err_exit "test_tail_fifo_2: Expected $(doublebackslashquote $'5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15'), got $(doublebackslashquote "$(cat tailout)")"
421 [[ "$( < "${OUTFILE}")" == "${followstr}" ]] || err_exit "${title}: Expected $(doublebackslashquote "${followstr}"), got "$(doublebackslashquote "$( < "${OUTFILE}")")""
429 err_exit "${title}: tail pid=${tailchild} hung."
473 err_exit "${title}: tail pid=${tailchild} hung."
480 outstr=$(/usr/bin/tail "${OUTFILE}") || err_exit "tail returned non-zero exit code $?"
481 [[ "${outstr}" == 49991*50000 ]] || err_exit "${title}: Expected match for 49991*50000, got "$(singlebackslashquote "${outstr}")""
496 rmdir "${tmpdir}" || err_exit "Cannot remove temporary directory ${tmpdir}".