Skip to content

Commit

Permalink
encoding/jsonschema: add a test for panicking about invalid pos
Browse files Browse the repository at this point in the history
This CL adds a test for the case that will be fixed in the next CL.

Change-Id: Idfa5d84ede406058d18ae33a5765fdd7da8d5d00
Signed-off-by: haoqixu <hq.xu0o0@gmail.com>
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1204320
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Roger Peppe <rogpeppe@gmail.com>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
  • Loading branch information
haoqixu authored and rogpeppe committed Nov 22, 2024
1 parent 8282ca5 commit 7d64696
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cmd/cue/cmd/testdata/script/invalid_tag_pos.txtar
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
! exec cue def jsonschema: schema.json
stderr 'panic: illegal Pos value'

-- schema.json --
{
"$id": "https://2.test.example/object ",
"type": "object",
"additionalProperties": false
}

0 comments on commit 7d64696

Please sign in to comment.