this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

cmd/cue: add test case for issue 3250

`@if` tags are currently treated as false when they're inside
a non-package file inside a module. Add a test case
for this, to be fixed in a subsequent CL.

For #3250.

Signed-off-by: Roger Peppe <rogpeppe@gmail.com>
Change-Id: I1aafec01ce2586158488bb30d77506622e53eaee
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1202737
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>

+21
+21
cmd/cue/cmd/testdata/script/issue3250.txtar
··· 1 + # This checks that @if tags work for files specified on the command line. 2 + 3 + # passes - no module 4 + exec cue export -t foo .:foo 5 + exec cue export -t foo foo.cue 6 + 7 + # set up module 8 + exec cue mod init 9 + 10 + # passes - with module 11 + exec cue export -t foo .:foo 12 + 13 + # fails - with module 14 + # TODO fix this case 15 + ! exec cue export -t foo foo.cue 16 + 17 + -- foo.cue -- 18 + @if(foo) 19 + package foo 20 + 21 + x: 1