This repository has been archived by the owner on Nov 18, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/encoding: support input validation
Also fixes a bug in go.go, which did not obey the `json:"-"` field tag. This does not yet introduce a file extension for possible combinations like cue+data. Closes #130 Change-Id: I03f18afb64e48d84cf6a645f5fb5f7c91299b032 Reviewed-on: https://cue-review.googlesource.com/c/cue/+/5261 Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
- Loading branch information
Showing
10 changed files
with
290 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
cue eval data: foo.cue | ||
cmp stdout expect-data-foo | ||
|
||
! cue eval data: bar.cue | ||
cmp stderr expect-data-bar | ||
|
||
cue eval graph: bar.cue | ||
cmp stdout expect-graph-bar | ||
|
||
-- foo.cue -- | ||
a: 4 | ||
b: { | ||
c: 1 | ||
} | ||
// Duplicates are still allowed. | ||
b: { | ||
d: 2 | ||
} | ||
|
||
-- bar.cue -- | ||
a: 4 | ||
b: { | ||
c: a | ||
} | ||
|
||
-- expect-data-foo -- | ||
a: 4 | ||
b: { | ||
c: 1 | ||
d: 2 | ||
} | ||
-- expect-data-bar -- | ||
references not allowed in data mode: | ||
./bar.cue:3:8 | ||
-- expect-graph-bar -- | ||
a: 4 | ||
b: { | ||
c: 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.