Skip to content

Commit

Permalink
cmd/cue: remove use of stderr directive
Browse files Browse the repository at this point in the history
The stderr directive makes it hard to search for error
strings in tests and hides when line numbers are not
properly output.

Signed-off-by: Marcel van Lohuizen <[email protected]>
Change-Id: I1b560047a819479169c87b433a5b18ef2ee3e75e
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/549210
Reviewed-by: Daniel Martí <[email protected]>
Unity-Result: CUEcueckoo <[email protected]>
TryBot-Result: CUEcueckoo <[email protected]>
  • Loading branch information
mpvl committed Feb 11, 2023
1 parent 9a7c8fb commit 7d89acd
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions cmd/cue/cmd/testdata/script/export_incomplete.txtar
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
# TODO: line numbers for errors.

#Issue 1153
#Issue 1152

# Default export mode
! exec cue export x.cue
stderr 'incomplete'
cmp stderr out/stderr

# JSON
! exec cue export --out json x.cue
stderr 'incomplete'
cmp stderr out/stderr

# Yaml
! exec cue export --out yaml x.cue
stderr 'incomplete'
cmp stderr out/stderr

# CUE data
! exec cue export --out cue x.cue
stderr 'incomplete'
cmp stderr out/stderr

# Concrete
! exec cue eval -c x.cue
stderr 'incomplete'
cmp stderr out/stderr

# CUE
exec cue eval --out cue x.cue
Expand All @@ -46,3 +48,5 @@ V2: ("x" | "y") | *#SomeBaseType.#AUTO
}
V1: "z"
V2: "x" | "y"
-- out/stderr --
V2: incomplete value "x" | "y"

0 comments on commit 7d89acd

Please sign in to comment.