github.com/rogpeppe/go-internal@v1.12.1-0.20240509064211-c8567cf8e95f/testscript/testdata/cond.txt (about)

     1  # test that exactly one of gc and gccgo is set
     2  [gc] mkdir gc_true
     3  [gccgo] mkdir gccgo_true
     4  
     5  [gc] ! exists gccgo_true
     6  [!gc] exists gccgo_true
     7  [gccgo] ! exists gc_true
     8  [!gccgo] exists gc_true
     9  
    10  # test that go version build tags are set
    11  [go1.1] mkdir go1.x
    12  [go2.1] mkdir go2.x
    13  
    14  exists go1.x
    15  ! exists go2.x
    16  
    17  # unix should be true on Linux and MacOS, but not on Windows.
    18  # Both platforms are tested on CI.
    19  [unix] mkdir unix_true
    20  
    21  [linux] exists unix_true
    22  [darwin] exists unix_true
    23  [windows] ! exists unix_true