Lines Matching refs:Output
257 atf_set "descr" "Test Output redirections"
266 rm -f Output 2>/dev/null || :
267 test -f Output && atf_fail "Unable to remove Output file"
269 i; atf_check -s exit:0 -o empty -e empty ${TEST_SH} -c '> Output'
270 test -f Output || atf_fail "#$T: Did not make Output file"
272 rm -f Output 2>/dev/null || :
273 i; atf_check -s exit:0 -o empty -e empty ${TEST_SH} -c '>> Output'
274 test -f Output || atf_fail "#$T: Did not make Output file"
276 rm -f Output 2>/dev/null || :
277 i; atf_check -s exit:0 -o empty -e empty ${TEST_SH} -c '>| Output'
278 test -f Output || atf_fail "#$T: Did not make Output file"
281 rm -f Output 2>/dev/null || :
283 atf_check -s exit:0 -o empty -e empty ${TEST_SH} -c 'echo Hello >Output'
284 test -s Output || atf_fail "#$T: Did not make non-empty Output file"
285 test "$(cat Output)" = "Hello" ||
286 atf_fail "#$T: Incorrect Output: Should be 'Hello' is '$(cat Output)'"
289 atf_check -s exit:0 -o empty -e empty ${TEST_SH} -c 'echo Hello>!Output'
290 test -s Output || atf_fail "#$T: Did not make non-empty Output file"
291 test "$(cat Output)" = "Hello" ||
292 atf_fail "#$T: Incorrect Output: Should be 'Hello' is '$(cat Output)'"
295 atf_check -s exit:0 -o empty -e empty ${TEST_SH} -c 'echo Bye >>Output'
296 test -s Output || atf_fail "#$T: Removed Output file"
297 test "$(cat Output)" = "Hello${nl}Bye" || atf_fail \
298 "#$T: Incorrect Output: Should be 'Hello\\nBye' is '$(cat Output)'"
302 'echo line 1 > Output; echo line 2 >> Output; cat Output'
303 test "$(cat Output)" = "line 1${nl}line 2" || atf_fail \
304 "#$T: Incorrect Output: Should be 'line 1\\nline 2' is '$(cat Output)'"
307 ${TEST_SH} -c 'echo line 1 > Output; echo line 2'
308 test "$(cat Output)" = "line 1" || atf_fail \
309 "#$T: Incorrect Output: Should be 'line 1' is '$(cat Output)'"
359 atf_set "descr" "Test Input+Output (BiDir) redirections"
368 rm -f Output 2>/dev/null || :
369 test -f Output && atf_fail "Unable to remove Output file"
371 i; atf_check -s exit:0 -o empty -e empty ${TEST_SH} -c '<> Output'
372 test -f Output || atf_fail "#$T: Did not make Output file"
375 echo data >Output 2>/dev/null || :
378 '<>Output'
379 test -f Output || atf_fail "#$T: Removed Output file"
380 test -s Output || atf_fail "#$T: Did not keep data in Output file"
381 test "$(cat Output)" = "data" ||
382 atf_fail "#$T: Incorrect Output: Should be 'data' is '$(cat Output)'"
385 rm -f Output 2>/dev/null || :
388 'echo Hello 1<>Output'
389 test -s Output || atf_fail "#$T: Did not keep non-empty Output file"
390 test "$(cat Output)" = "Hello" ||
391 atf_fail "#$T: Incorrect Output: Should be 'Hello' is '$(cat Output)'"
394 printf data >Output 2>/dev/null || :
397 'cat <>Output'
398 test -f Output || atf_fail "#$T: Removed Output file"
399 test -s Output || atf_fail "#$T: Did not keep data in Output file"
400 test "$(cat Output)" = "data" ||
401 atf_fail "#$T: Incorrect Output: Should be 'data' is '$(cat Output)'"
404 echo data >Output 2>/dev/null || :
407 'echo Hello 1<>Output'
408 test -s Output || atf_fail "#$T: Did not make non-empty Output file"
409 test "$(cat Output)" = "Hello" ||
410 atf_fail "#$T: Incorrect Output: Should be 'Hello' is '$(cat Output)'"
413 printf data >Output 2>/dev/null || :
416 '{ cat >&3; printf file; } <>Output 3>&1 >&0'
417 test -f Output || atf_fail "#$T: Removed Output file"
418 test -s Output || atf_fail "#$T: Did not keep data in Output file"
419 test "$(cat Output)" = "datafile" ||
421 "#$T: Incorrect Output: Should be 'datafile' is '$(cat Output)'"
664 rm -f Output 2>/dev/null || :
665 atf_check -s exit:0 -e empty -o inline:'A Line > Output\n' \
666 ${TEST_SH} -c 'echo A Line \> Output'
667 test -f Output && atf_file "File 'Output' appeared and should not have"
669 rm -f Output 2>/dev/null || :
671 ${TEST_SH} -c 'echo A Line \>> Output'
672 test -f Output || atf_file "File 'Output' not created when it should"
673 test "$(cat Output)" = 'A Line >' || atf_fail \
674 "Output file contains '$(cat Output)' instead of '"'A Line >'\'
676 rm -f Output \> 2>/dev/null || :
678 ${TEST_SH} -c 'echo A Line >\> Output'
679 test -f Output && atf_file "File 'Output' appeared and should not have"
681 test "$(cat '>')" = 'A Line Output' || atf_fail \
682 "Output file ('>') contains '$(cat '>')' instead of 'A Line Output'"
749 exec 6>output-file
753 exec 8<output-file
999 # then the 'F' & 'G' will precede 'X Y' in the output.
1003 # output (otherwise atf_check will be finished while