mod/modzip: add test for go.mod submodule detection
Add a test case documenting the current behavior where directories
containing go.mod files are skipped during directory walks. This is
incorrect for CUE, which uses cue.mod directories instead of go.mod
files to mark module boundaries.
The test shows the asymmetry: cue.mod submodules have their files
filtered by CheckFiles ("file is in another module"), while go.mod
submodules are skipped at walk time ("directory is in another module").
This was likely a mistake when borrowing some of the logic from Go
when we initially introduced support for modern OCI-based CUE modules.
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: I8553bb5cdef83c1fddeb26eed7d7ebd90df9a895
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1229770
Reviewed-by: Matthew Sackman <matthew@cue.works>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>