Debian Codegraph @

go/analysis/internal/checker/testdata/diff.txt

raw
1 # Basic test of -diff: ensure that stdout contains a diff,
2 # and the file system is unchanged.
3 #
4 # (Most tests of fixes should use want/* not -diff + stdout
5 # to avoid dependency on the diff algorithm.)
6 #
7 # File slashes assume non-Windows.
8
9 skip GOOS=windows
10 checker -rename -fix -diff example.com/p
11 exit 0
12
13 -- go.mod --
14 module example.com
15 go 1.22
16
17 -- p/p.go --
18 package p
19
20 var bar int
21
22 -- want/p/p.go --
23 package p
24
25 var bar int
26
27 -- stdout --
28 --- /TMP/p/p.go (old)
29 +++ /TMP/p/p.go (new)
30 @@ -1,4 +1,3 @@
31 package p
32
33 -var bar int
34 -
35 +var baz int