cmd/go/internal/mvs: add test case demonstrating trimming

Just wanted to remind myself that unnecessary modules
traversed due to loading older modules than the final ones
selected are properly removed from the final build list.

Change-Id: I3f913ddc02b5ad920f2b91d3b3243928425fd2ec
Reviewed-on: https://go-review.googlesource.com/117936
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
diff --git a/vendor/cmd/go/internal/mvs/mvs_test.go b/vendor/cmd/go/internal/mvs/mvs_test.go
index 26b2305..3f547f4 100644
--- a/vendor/cmd/go/internal/mvs/mvs_test.go
+++ b/vendor/cmd/go/internal/mvs/mvs_test.go
@@ -32,6 +32,13 @@
 upgrade A C4: A B1 C4 D4 E2 F1 G1
 downgrade A2 D2: A2 C4 D2
 
+name: trim
+A: B1 C2
+B1: D3
+C2: B2
+B2:
+build A: A B2 C2
+
 # Cross-dependency between D and E.
 # No matter how it arises, should get result of merging all build lists via max,
 # which leads to including both D2 and E2.