Next: testing messages, Previous: testing compare, Up: testing [Contents][Index]
Read all the available lines from stdin accumulating them into a local
variable, separated by \n
; then compare the input with
string, or the empty string if string is not present, and
return true if they are equal, false otherwise.
Example of test for a function that echoes its three parameters:
function my-lib-function () { echo $1 $2 $3 } function mytest-1.1 () { my-lib-function a b c | dotest-output "a b c" } dotest mytest
Example of test for a function that is supposed to print nothing:
function my-lib-function () { test "$1" != "$2" && echo error } function mytest-1.1 () { my-lib-function a a | dotest-output } dotest mytest
Next: testing messages, Previous: testing compare, Up: testing [Contents][Index]