cmd/cue: add a regression test for issue 2704
Trying to export or vet the cue and json files together, where the first
contained a schema with a disjunction and a regular expression,
results in an incorrect error with the old evaluator.
Thankfully, the new evaluator already handles this correctly.
Add a regression test to ensure that this edge case remains fixed.
Note that I was unable to reproduce this bug with cmd/cue
with the old evaluator using a single CUE file, so it was hard
to add this reproducer as a unit test case elsewhere.
Closes #2704.
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: I13e4180dba7486909a50fa0fe1300ac05b183ca0
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1194741
Reviewed-by: Paul Jolly <paul@myitcv.io>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>