File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
cmd/cue/cmd/testdata/script Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Test what happens when there is an error an embedded file.
2
+ # TODO the error should mention the name of the file where the error is.
3
+
4
+ env CUE_EXPERIMENT=embed
5
+ ! exec cue vet
6
+ cmp stderr want-stderr
7
+ ! exec cue export
8
+ cmp stderr want-stderr
9
+ ! exec cue def
10
+ cmp stderr want-stderr
11
+
12
+ -- want-stderr --
13
+ @embed: invalid string:
14
+ ./x.cue:5:6
15
+ -- cue.mod/module.cue --
16
+ module: "test.example"
17
+ language: version: "v0.9.2"
18
+ -- x.cue --
19
+ @extern(embed)
20
+
21
+ package x
22
+
23
+ e: _ @embed(glob="*.json",type=jsonschema)
24
+
25
+ -- schema.json --
26
+ {
27
+ "$schema": "http://json-schema.org/draft-04/schema#",
28
+ "additionalProperties": false,
29
+ "id": "https://example.test/example",
30
+ "required": ["x"],
31
+ "title": "example jsonschema",
32
+ "type": "object",
33
+ "properties": {
34
+ "x": {
35
+ "description": true,
36
+ "type": "number"
37
+ }
38
+ }
39
+ }
You can’t perform that action at this time.
0 commit comments