Text file src/cmd/go/testdata/script/work_sync_sum.txt

     1  # Test that the sum file data state is properly reset between modules in
     2  # go work sync so that the sum file that's written is correct.
     3  # Exercises the fix to #50038.
     4  
     5  cp b/go.sum b/go.sum.want
     6  
     7  # As a sanity check, verify b/go.sum is tidy.
     8  cd b
     9  go mod tidy
    10  cd ..
    11  cmp b/go.sum b/go.sum.want
    12  
    13  # Run go work sync and verify it doesn't change b/go.sum.
    14  go work sync
    15  cmp b/go.sum b/go.sum.want
    16  
    17  -- b/go.sum --
    18  rsc.io/quote v1.0.0 h1:kQ3IZQzPTiDJxSZI98YaWgxFEhlNdYASHvh+MplbViw=
    19  rsc.io/quote v1.0.0/go.mod h1:v83Ri/njykPcgJltBc/gEkJTmjTsNgtO1Y7vyIK1CQA=
    20  -- go.work --
    21  go 1.18
    22  use (
    23      ./a
    24      ./b
    25  )
    26  replace example.com/c => ./c
    27  -- a/go.mod --
    28  module example.com/a
    29  go 1.18
    30  require rsc.io/fortune v1.0.0
    31  -- a/a.go --
    32  package a
    33  import "rsc.io/fortune"
    34  -- b/go.mod --
    35  module example.com/b
    36  go 1.18
    37  require rsc.io/quote v1.0.0
    38  -- b/b.go --
    39  package b
    40  import _ "rsc.io/quote"
    41  

View as plain text