Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DO NOT MERGE test [unix] via testscript
- Loading branch information
Showing
3 changed files
with
19 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,23 @@ | ||
[!exec:sh] skip 'sh not found in $PATH' | ||
|
||
# test that exactly one of gc and gccgo is set | ||
[gc] exec sh -c 'echo gc >> go-compiler' | ||
[gccgo] exec sh -c 'echo gccgo >> go-compiler' | ||
grep '\A(gc|gccgo)\n\z' go-compiler | ||
[gc] mkdir gc_true | ||
[gccgo] mkdir gccgo_true | ||
|
||
[gc] ! exists gccgo_true | ||
[!gc] exists gccgo_true | ||
[gccgo] ! exists gc_true | ||
[!gccgo] exists gc_true | ||
|
||
# test that go version build tags are set | ||
[go1.1] exec sh -c 'echo go1.1 >> go-version' | ||
[go2.1] exec sh -c 'echo go2.1 >> go-version' | ||
grep '\Ago1\.1\n\z' go-version | ||
[go1.1] mkdir go1.x | ||
[go2.1] mkdir go2.x | ||
|
||
exists go1.x | ||
! exists go2.x | ||
|
||
# unix should be true on Linux and MacOS, but not on Windows. | ||
# Both platforms are tested on CI. | ||
[unix] mkdir unix_true | ||
|
||
# test that either 'unix' or '!unix' is true | ||
[unix] exec sh -c 'echo unix >> unixness' | ||
[!unix] exec sh -c 'echo not unix >> unixness' | ||
[unix] grep '\Aunix\n\z' unixness | ||
[!unix] grep '\Anot unix\n\z' unixness | ||
[linux] exists unix_true | ||
[darwin] exists unix_true | ||
[windows] ! exists unix_true |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.