From 7a6a5f804c24039a8741921b97ffa0c3b8998be3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Thu, 4 Aug 2022 16:34:41 +0100 Subject: [PATCH] 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. --- testscript/doc.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/testscript/doc.go b/testscript/doc.go index 28db63e7..d1dfc9dc 100644 --- a/testscript/doc.go +++ b/testscript/doc.go @@ -56,11 +56,13 @@ As an example: Each script runs in a fresh temporary work directory tree, available to scripts as $WORK. Scripts also have access to these other environment variables: - HOME=/no-home PATH= - TMPDIR=$WORK/tmp + HOME=/no-home + TMPDIR=$WORK/.tmp devnull= - goversion= + /= + := + $=$ The environment variable $exe (lowercase) is an empty string on most systems, ".exe" on Windows.