this repo has no description
0
fork

Configure Feed

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

cmd/cue: ensure that fmt works outside a module with files too

https://cuelang.org/cl/1194851 fixed this recent regression
and added a test case with stdin outside of a CUE module,
but it didn't add a similar test case with a file argument.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: I06a17b1edf8651210a0123b0f260f42d16031a93
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1194853
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Paul Jolly <paul@myitcv.io>

+4 -1
+4 -1
cmd/cue/cmd/testdata/script/fmt_import_no_module.txtar
··· 1 1 # This tests that when there's an import and no current module, 2 - # fmt will still work. 2 + # fmt will still work with both stdin and files. 3 3 4 4 stdin a/x.cue 5 5 exec cue fmt - 6 6 cmp stdout a.cue-want 7 + 8 + exec cue fmt a/x.cue 9 + cmp a/x.cue a.cue-want 7 10 8 11 -- a/x.cue -- 9 12 package x