Skip to content

Commit 7a6a5f8

Browse files
committed
testscript: update docs on set variables
We have been setting `/`, `:`, and `$` for some time, but they weren't documented. Do that. `goversion` doesn't belong here, as it was moved to `gotooltest`. `TMPDIR` was slightly wrong; it has started with a period for some time, to ensure that tools like `go list ./...` don't descend into it.
1 parent c16c0a2 commit 7a6a5f8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

testscript/doc.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,13 @@ As an example:
5656
Each script runs in a fresh temporary work directory tree, available to scripts as $WORK.
5757
Scripts also have access to these other environment variables:
5858
59-
HOME=/no-home
6059
PATH=<actual PATH>
61-
TMPDIR=$WORK/tmp
60+
HOME=/no-home
61+
TMPDIR=$WORK/.tmp
6262
devnull=<value of os.DevNull>
63-
goversion=<current Go version; for example, 1.12>
63+
/=<value of os.PathSeparator>
64+
:=<value of os.PathListSeparator>
65+
$=$
6466
6567
The environment variable $exe (lowercase) is an empty string on most
6668
systems, ".exe" on Windows.

0 commit comments

Comments
 (0)