...

Text file src/github.com/rogpeppe/go-internal/testscript/testdata/testscript_stdout_stderr_error.txt

Documentation: github.com/rogpeppe/go-internal/testscript/testdata

     1# Verify that stdout and stderr get set event when a user-builtin
     2# command aborts. Note that we need to assert against stdout
     3# because our meta testscript command sees only a single log.
     4unquote scripts/testscript.txt
     5! testscript -v scripts
     6cmpenv stdout stdout.golden
     7
     8-- scripts/testscript.txt --
     9> printargs hello world
    10> echoandexit 1 'this is stdout' 'this is stderr'
    11-- stdout.golden --
    12>  printargs hello world
    13[stdout]
    14["printargs" "hello" "world"]
    15>  echoandexit 1 'this is stdout' 'this is stderr'
    16[stdout]
    17this is stdout
    18[stderr]
    19this is stderr
    20FAIL: ${$}WORK${/}scripts${/}testscript.txt:2: told to exit with code 1

View as plain text