github.com/rogpeppe/go-internal@v1.12.1-0.20240509064211-c8567cf8e95f/testscript/testdata/testscript_explicit_exec.txt (about) 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 6 unquote scripts-implicit/testscript.txt 7 unquote scripts-explicit/testscript.txt 8 9 testscript scripts-implicit 10 testscript scripts-explicit 11 12 ! testscript -explicit-exec scripts-implicit 13 testscript -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