aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/testdata/script/README
diff options
context:
space:
mode:
authorBryan C. Mills <bcmills@google.com>2022-01-26 09:50:41 -0500
committerBryan Mills <bcmills@google.com>2022-01-26 15:51:52 +0000
commit827babf6aa602c76e45fabfdc2efe8d3f30edabd (patch)
tree43e7fdc3d1e96e25d7985c5a3b611b731d5df8f9 /src/cmd/go/testdata/script/README
parent6eb58cdffa1ab334493776a25ccccfa89c2ca7ac (diff)
downloadgo-827babf6aa602c76e45fabfdc2efe8d3f30edabd.tar.gz
go-827babf6aa602c76e45fabfdc2efe8d3f30edabd.zip
cmd/go: add mv and support "! cmp" in script tests
For #50183 Change-Id: Ie384333fb7a69d0d2cfaba0cfc4eb7afba2fd745 Reviewed-on: https://go-review.googlesource.com/c/go/+/380916 Trust: Bryan Mills <bcmills@google.com> Run-TryBot: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/cmd/go/testdata/script/README')
-rw-r--r--src/cmd/go/testdata/script/README13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/cmd/go/testdata/script/README b/src/cmd/go/testdata/script/README
index 2b55fa8977..b2a7fd1915 100644
--- a/src/cmd/go/testdata/script/README
+++ b/src/cmd/go/testdata/script/README
@@ -110,14 +110,15 @@ The commands are:
Change the permissions of the files or directories named by the path arguments
to be equal to perm. Only numerical permissions are supported.
-- cmp file1 file2
- Check that the named files have the same content.
+- [! | ?] cmp file1 file2
+ Check that the named files have (or do not have) the same content.
By convention, file1 is the actual data and file2 the expected data.
File1 can be "stdout" or "stderr" to use the standard output or standard error
from the most recent exec or go command.
- (If the files have differing content, the failure prints a diff.)
+ (If the file contents differ and the command is not negated,
+ the failure prints a diff.)
-- cmpenv file1 file2
+- [! | ?] cmpenv file1 file2
Like cmp, but environment variables are substituted in the file contents
before the comparison. For example, $GOOS is replaced by the target GOOS.
@@ -163,6 +164,10 @@ The commands are:
- mkdir path...
Create the listed directories, if they do not already exists.
+- mv path1 path2
+ Rename path1 to path2. OS-specific restrictions may apply when path1 and path2
+ are in different directories.
+
- rm file...
Remove the listed files or directories.