github.com/zxy12/go_duplicate_112_new@v0.0.0-20200807091221-747231827200/src/cmd/go/testdata/script/get_brace.txt (about)

     1  [!exec:git] skip
     2  
     3  # Set up some empty repositories.
     4  cd $WORK/_origin/foo
     5  exec git init
     6  exec git config user.name 'Nameless Gopher'
     7  exec git config user.email 'nobody@golang.org'
     8  exec git commit --allow-empty -m 'create master branch'
     9  
    10  cd $WORK
    11  cd '_origin/{confusing}'
    12  exec git init
    13  exec git config user.name 'Nameless Gopher'
    14  exec git config user.email 'nobody@golang.org'
    15  exec git commit --allow-empty -m 'create master branch'
    16  
    17  # Clone the empty repositories into GOPATH.
    18  # This tells the Go command where to find them: it takes the place of a user's meta-tag redirector.
    19  mkdir $GOPATH/src/example.com
    20  cd $GOPATH/src/example.com
    21  exec git clone $WORK/_origin/foo
    22  exec git clone $WORK/_origin/{confusing}
    23  
    24  # Commit contents to the repositories.
    25  cd $WORK/_origin/foo
    26  exec git add main.go
    27  exec git commit -m 'add main'
    28  
    29  cd $WORK
    30  cd '_origin/{confusing}'
    31  exec git add confusing.go
    32  exec git commit -m 'just try to delete this!'
    33  
    34  # 'go get' should refuse to download or update the confusingly-named repo.
    35  cd $GOPATH/src/example.com/foo
    36  ! go get -u 'example.com/{confusing}'
    37  stderr 'invalid char'
    38  ! go get -u example.com/foo
    39  stderr 'invalid import path'
    40  ! exists example.com/{confusing}
    41  
    42  -- $WORK/_origin/foo/main.go --
    43  package main
    44  import _ "example.com/{confusing}"
    45  
    46  func main() {}
    47  
    48  -- $WORK/_origin/{confusing}/confusing.go --
    49  package confusing