Lines Matching +full:3 +full:- +full:line
51 result="$( ${TEST_SH} -c "${CMD}" 2>"${TEMP_FILE}" )"
54 if [ "${STATUS}" -ne "$3" ]; then
55 echo >&2 "[$TEST_NUM] expected exit code $3, got ${STATUS}"
59 case "$3/${STATUS}" in
64 if [ "$3" -eq 0 ]; then
65 if [ -s "${TEMP_FILE}" ]; then
72 if ! [ -s "${TEMP_FILE}" ]; then
78 rm -f "${TEMP_FILE}"
96 $fail && test -n "$TEST_ID" && {
108 test -z "${TEST_ID}" && return 0
109 test -z "${TEST_FAILURES}" && return 0
113 echo >&2 " - - - - - - - - - - - - - - - - -"
116 "Test ${TEST_ID}: $TEST_FAIL_COUNT subtests (of $TEST_NUM) failed - see stderr"
159 check 'x=`cat <<-EOF'"$nl text${nl}EOF$nl"'`; echo $x' \
161 check 'x=`cat <<-EOF'"${nl}text${nl} EOF$nl"'`; echo $x' \
163 check 'x=`cat <<-\EOF'"$nl text${nl} EOF$nl"'`; echo $x' \
165 check 'x=`cat <<- "EOF"'"$nl text${nl}EOF$nl"'`; echo $x' \
167 check 'x=`cat <<- '"'EOF'${nl}text${nl} EOF$nl"'`; echo $x' \
180 --STRING-- . '~~~' ')' '(' '#' '()' '(\)' '(\/)' '--' '\' '{' '}' \
218 # or which does not begin at start of line
226 # or end at end of line
239 (2-7) pfx="${end%?}"
274 check 'cat <<- EOF' '' 2
276 check 'cat <<- \EOF' '' 2
279 check 'cat <<- EOF'"${nl}" '' 2
281 check 'cat <<- "EOF"'"${nl}" '' 2
284 check 'cat <<-EOF'"${nl}${nl}" '' 2
286 check 'cat <<-"EOF"'"${nl}${nl}" '' 2
288 check 'cat << EOF'"${nl}"'line 1'"${nl}" '' 2
289 check 'cat <<-EOF'"${nl}"' line 1'"${nl}" '' 2
290 check 'cat << EOF'"${nl}"'line 1'"${nl}"' line 2'"${nl}" '' 2
291 check 'cat <<-EOF'"${nl}"' line 1'"${nl}"'line 2'"${nl}" '' 2
293 check 'cat << EOF'"${nl}line 1${nl}${nl}line3${nl}${nl}5!${nl}" '' 2
300 atf_set "descr" "Tests for line endings in here documents"
312 check 'X=3; cat << ec\ho'"${nl}"'$X\'"${nl}echo${nl}echo${nl}" \
314 check 'X=3; cat << echo'"${nl}"'$X'"${nl}echo${nl}echo${nl}" \
315 '3' 0
316 check 'X=3; cat << echo'"${nl}"'$X\'"${nl}echo${nl}echo${nl}" \
318 check 'X=3; cat << echo'"${nl}"'${X}\'"${nl}echo${nl}echo${nl}" \
319 '3echo' 0
320 check 'X=3; cat << echo'"${nl}"'\$X\'"${nl}echo${nl}echo${nl}" \
322 check 'X=3; cat << echo'"${nl}"'\\$X \'"${nl}echo${nl}echo${nl}" \
323 '\3 echo' 0
337 atf_set "descr" "Tests for multiple here documents on one cmd line"
343 "(cat ; cat <&3) <<EOF0 3<<EOF3${nl}STDIN${nl}EOF0${nl}-3-${nl}EOF3${nl}" \
344 'STDIN -3-' 0
346 check "(read line; echo \"\$line\"; cat <<EOF1; echo \"\$line\") <<EOF2
349 The Line
351 " 'The Line The File The Line' 0
353 check "(read line; echo \"\$line\"; cat <<EOF; echo \"\$line\") <<EOF
356 The Line
358 " 'The Line The File The Line' 0
360 check "V=1; W=2; cat <<-1; cat <<2; cat <<- 3; cat <<'4';"' cat <<\5
363 3
370 3
374 3
379 ' '1 2 3 4 5 5 4*2+$V $W 1 2 3 7+$V $W+6' 0
392 'cat << EOF1'"${nl}"'$(cat << EOF2'"${nl}LINE${nl}EOF2${nl}"')'"${nl}EOF1${nl}"\
393 'LINE' 0
400 # LINE
402 # which looks like a good command - except it is being parsed in "heredoc"
404 # the newline after the ')' in the first line is not a newline token, but
406 # newline token, of which there are none here... LINE and EOF2 are just
409 # The previous sub-test works because there the \n comes inside the
411 # all starts again - so that \n is a newline token, and the EOF2 heredoc
415 # 'cat << EOF1'"${nl}"'$(cat << EOF2 )'"${nl}LINE${nl}EOF2${nl}EOF1${nl}" \
416 # 'LINE' 0
422 L="${L}LINE5${nl}EOF5${nl})4${nl}EOF4${nl})3${nl}"
436 # )3
455 check 'X=!; cat <<- E\0F
460 check 'X=!; cat <<- E0F
465 check 'cat <<- END
470 check 'X=12345; Y="string1 line1?-line2"; Z=; unset W; cat <<-EOF
471 ${#X}${Z:-${Y}}${W+junk}${Y%%l*}${Y#*\?}
474 ' '5string1 line1?-line2string1 -line2 ""'\'\'' string1 66666' 0
485 atf_check -s exit:0 -o inline:'2\n1\n' -e empty ${TEST_SH} -c '
487 cat <<-EOF
490 echo "${X-1}"
501 cat <<- \END_SCRIPT > script
510 atf_check -s exit:0 -o inline:'a\nb\n' -e empty ${TEST_SH} script
517 # A:echo line 1
518 # B:echo line 2)" && prefix DASH_CODE <<DASH_CODE
519 # B:echo line 3
520 # line 4
521 # line 5
525 # A:echo line 3
526 # B:echo line 1
527 # line 2
528 # DASH_CODE:echo line 4)"
529 # DASH_CODE:echo line 5
534 cat <<- \END_SCRIPT > script
535 prefix() { sed -e "s/^/$1:/"; }
539 echo line 1
541 echo line 2)" && prefix DASH_CODE <<DASH_CODE
542 echo line 3
544 echo line 4)"
545 echo line 5
552 atf_check -s exit:0 -o ignore -e empty ${TEST_SH} script
559 atf_add_test_case lineends # test weird line endings in heredocs
564 atf_add_test_case vicious # evil test from the austin-l list...