cmd/cue: add test for mod edit strictness
This CL adds a check for `cue mod edit` when
run on a module.cue file that is not acceptable to
strict checking, in preparation for a change
to make it work even with non-strict files.
It also changes the `cue mod tidy` check to ensure that
it adds major versions to dependency modules when
they are not present and that the major version is
not added when not already present. These are both
things that should probably have been tested here before
but were not.
Signed-off-by: Roger Peppe <rogpeppe@gmail.com>
Change-Id: Ib1229a27c962315a51a66c87608d1022cde3b5e8
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1196179
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>