Skip to content

Commit

Permalink
cmd/cue: add test case for bad jsonl syntax error positions
Browse files Browse the repository at this point in the history
For #2776.

Signed-off-by: Daniel Martí <[email protected]>
Change-Id: Id353bef957aa768a8a846f7cd0ef51ad9091d5b6
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1199102
TryBot-Result: CUEcueckoo <[email protected]>
Unity-Result: CUE porcuepine <[email protected]>
Reviewed-by: Roger Peppe <[email protected]>
  • Loading branch information
mvdan committed Aug 12, 2024
1 parent 40eed23 commit 5e19deb
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions cmd/cue/cmd/testdata/script/json_syntax_error.txtar
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ stderr 'x3.json:1:1'
! exec cue export x4.json
stderr 'x4.json:1:1'

! exec cue export x5.jsonl
# TODO(mvdan): the position below seems to be incorrect,
# as it points to the end of the previous value instead.
stderr 'x5.jsonl:6:2'
# stderr 'x5.jsonl:8:12'

-- x1.json --
{
"foo": true,
Expand All @@ -24,3 +30,13 @@ stderr 'x4.json:1:1'
baz: false

-- x4.json --
-- x5.jsonl --
{
"foo": true
}
{
"bar": false
}
{
"invalid": ]
}

0 comments on commit 5e19deb

Please sign in to comment.