...

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

Documentation: cmd/go/testdata/script

     1# Test case for #67623 in go.work files: make sure the errors are
     2# printed on lines starting with file and line number so they
     3# can be easily parsed by tools.
     4
     5cp go.work.repeated.txt go.work
     6! go list
     7stderr '^go.work:4: path .* appears multiple times in workspace$'
     8
     9cp go.work.badgodebug.txt go.work
    10! go list
    11stderr '^go.work:3: unknown godebug "foo"$'
    12
    13cp go.work.unparsable.txt go.work
    14! go list
    15stderr '^go.work:5: unknown directive: notadirective'
    16
    17cp go.work.firstlineerr.txt go.work
    18! go list
    19stderr '^go.work:1: unknown godebug "bar"$'
    20
    21cp go.work.firsterrlisted.txt go.work
    22! go list
    23stderr '^go.work:1: unknown godebug "baz"$'
    24
    25-- foo/go.mod --
    26module example.com/foo
    27-- go.work.repeated.txt --
    28
    29
    30use foo
    31use foo
    32-- go.work.badgodebug.txt --
    33
    34
    35godebug foo=1
    36-- go.work.unparsable.txt --
    37
    38
    39
    40
    41notadirective
    42-- go.work.firstlineerr.txt --
    43godebug bar=1
    44-- go.work.firsterrlisted.txt --
    45godebug baz=1
    46godebug baz=1

View as plain text