...

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

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

     1# Check that RequireExplicitExec works;
     2# it should reject `fprintargs` in favor of `exec fprintargs`,
     3# but it shouldn't complain about `some-param-cmd`,
     4# as that Params.Cmds entry won't work via `exec some-param-cmd`.
     5
     6unquote scripts-implicit/testscript.txt
     7unquote scripts-explicit/testscript.txt
     8
     9testscript scripts-implicit
    10testscript scripts-explicit
    11
    12! testscript -explicit-exec scripts-implicit
    13testscript -explicit-exec scripts-explicit
    14
    15-- scripts-implicit/testscript.txt --
    16>fprintargs stdout right
    17>cmp stdout expect
    18>
    19>some-param-cmd
    20>! exec some-param-cmd
    21>
    22>-- expect --
    23>right
    24-- scripts-explicit/testscript.txt --
    25>exec fprintargs stdout right
    26>cmp stdout expect
    27>
    28>some-param-cmd
    29>! exec some-param-cmd
    30>
    31>-- expect --
    32>right

View as plain text