Skip to content

Commit 11cbcd3

Browse files
committed
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í <[email protected]> Change-Id: I06a17b1edf8651210a0123b0f260f42d16031a93 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1194853 Unity-Result: CUE porcuepine <[email protected]> TryBot-Result: CUEcueckoo <[email protected]> Reviewed-by: Paul Jolly <[email protected]>
1 parent 078020b commit 11cbcd3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cmd/cue/cmd/testdata/script/fmt_import_no_module.txtar

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
# 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.
33

44
stdin a/x.cue
55
exec cue fmt -
66
cmp stdout a.cue-want
77

8+
exec cue fmt a/x.cue
9+
cmp a/x.cue a.cue-want
10+
811
-- a/x.cue --
912
package x
1013

0 commit comments

Comments
 (0)