...

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

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

     1# Verify that when we don't update stdout when we don't attempt to write via Stdout()
     2fprintargs stdout hello stdout from fprintargs
     3stdout 'hello stdout from fprintargs'
     4echoandexit 0
     5stdout 'hello stdout from fprintargs'
     6
     7# Verify that when we don't update stderr when we don't attempt to write via Stderr()
     8fprintargs stderr hello stderr from fprintargs
     9stderr 'hello stderr from fprintargs'
    10echoandexit 0
    11stderr 'hello stderr from fprintargs'
    12
    13# Verify that we do update stdout when we attempt to write via Stdout() or Stderr()
    14fprintargs stdout hello stdout from fprintargs
    15stdout 'hello stdout from fprintargs'
    16! stderr .+
    17echoandexit 0 'hello stdout from echoandexit'
    18stdout 'hello stdout from echoandexit'
    19! stderr .+
    20fprintargs stdout hello stdout from fprintargs
    21stdout 'hello stdout from fprintargs'
    22! stderr .+
    23echoandexit 0 '' 'hello stderr from echoandexit'
    24! stdout .+
    25stderr 'hello stderr from echoandexit'
    26
    27# Verify that we do update stderr when we attempt to write via Stdout() or Stderr()
    28fprintargs stderr hello stderr from fprintargs
    29! stdout .+
    30stderr 'hello stderr from fprintargs'
    31echoandexit 0 'hello stdout from echoandexit'
    32stdout 'hello stdout from echoandexit'
    33! stderr .+
    34fprintargs stdout hello stdout from fprintargs
    35stdout 'hello stdout from fprintargs'
    36! stderr .+
    37echoandexit 0 '' 'hello stderr from echoandexit'
    38! stdout .+
    39stderr 'hello stderr from echoandexit'

View as plain text