As of c8567cf , the following (which can be used as a testscript test for testscript itself) fails when it should succeed:
env BLAH='\'
exec echo ..${BLAH}LICENSE
stdout ..${BLAH}LICENSE
The output is:
--- FAIL: TestScripts (0.00s)
--- FAIL: TestScripts/stdout (0.00s)
testscript.go:558: > env BLAH='\'
> exec echo ..${BLAH}LICENSE
[stdout]
..\LICENSE
> stdout ..${BLAH}LICENSE
FAIL: testdata/stdout.txt:3: error parsing regexp: invalid escape sequence: `\L`
FAIL
FAIL github.com/rogpeppe/go-internal/testscript 1.857s
Upstream Go succeeds with this test (as of golang/go@9b43bfb).