...
1# When there is a short single-line message, 'go get' should print it all.
2go get short
3stderr '^go: module short is deprecated: short$'
4go list -m -u -f '{{.Deprecated}}' short
5stdout '^short$'
6
7# When there is a multi-line message, 'go get' should print the first line.
8go get multiline
9stderr '^go: module multiline is deprecated: first line$'
10! stderr 'second line'
11go list -m -u -f '{{.Deprecated}}' multiline
12stdout '^first line\nsecond line.$'
13
14# When there is a long message, 'go get' should print a placeholder.
15go get long
16stderr '^go: module long is deprecated: \(message omitted: too long\)$'
17go list -m -u -f '{{.Deprecated}}' long
18stdout '^aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa$'
19
20# When a message contains unprintable characters, 'go get' should say that
21# without printing the message.
22go get unprintable
23stderr '^go: module unprintable is deprecated: \(message omitted: contains non-printable characters\)$'
24go list -m -u -f '{{.Deprecated}}' unprintable
25stdout '^message contains ASCII BEL\x07$'
26
27-- go.mod --
28module use
29
30go 1.16
31
32require (
33 short v0.0.0
34 multiline v0.0.0
35 long v0.0.0
36 unprintable v0.0.0
37)
38
39replace (
40 short v0.0.0 => ./short
41 multiline v0.0.0 => ./multiline
42 long v0.0.0 => ./long
43 unprintable v0.0.0 => ./unprintable
44)
45-- short/go.mod --
46// Deprecated: short
47module short
48
49go 1.16
50-- short/short.go --
51package short
52-- multiline/go.mod --
53// Deprecated: first line
54// second line.
55module multiline
56
57go 1.16
58-- multiline/multiline.go --
59package multiline
60-- long/go.mod --
61// Deprecated: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
62module long
63
64go 1.16
65-- long/long.go --
66package long
67-- unprintable/go.mod --
68// Deprecated: message contains ASCII BEL
69module unprintable
70
71go 1.16
72-- unprintable/unprintable.go --
73package unprintable
View as plain text