blob: db640a5d7688da4d4050ac6cad538e5ffe224123 [file] [log] [blame]
Josh Bleecher Snyder26b6f9b2025-07-01 01:41:11 +00001Tests related files caching when the exact same set of changed files is processed multiple times
2
3-- a.go --
4package main
5
6func a() {}
7
8-- b.go --
9package main
10
11func b() {}
12
13-- c.go --
14package main
15
16func c() {}
17
18-- .commit --
19Create initial commit
20
21-- a.go --
22package main
23
24func a() {
25 // Update 1
26}
27
28-- b.go --
29package main
30
31func b() {
32 // Update 1
33}
34
35-- .commit --
36Update both a.go and b.go together (creates relationship)
37
38-- a.go --
39package main
40
41func a() {
42 // Update 2
43}
44
45-- b.go --
46package main
47
48func b() {
49 // Update 2
50}
51
52-- .commit --
53Update both a.go and b.go together again (strengthens relationship)
54
55-- a.go --
56package main
57
58func a() {
59 // Update 3
60}
61
62-- c.go --
63package main
64
65func c() {
66 // Update 1
67}
68
69-- .commit --
70Update a.go and c.go together (creates another relationship)
71
72-- a.go --
73package main
74
75func a() {
76 // Update 4 - first time processing this exact set
77}
78
79-- .commit --
80First time changing just a.go
81
82-- .run_test --
83OK
84-- a.go --
85package main
86
87func a() {
88 // Update 5 - second time processing this exact same set, should be cached
89}
90
91-- .commit --
92Second time changing just a.go (should be cached)
93
94-- .run_test --
95OK