Skip to content

Commit e0010dd

Browse files
committed
cmd/cue: add test cases for issue 3968
We add test cases for the panic described in issue 3968, to be fixed in a subsequent CL. For #3968. Signed-off-by: Roger Peppe <[email protected]> Change-Id: I2a4968f09d1cdcadfbb232f0f021f3027a63a858 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1216861 Unity-Result: CUE porcuepine <[email protected]> TryBot-Result: CUEcueckoo <[email protected]> Reviewed-by: Daniel Martí <[email protected]>
1 parent b20d1a4 commit e0010dd

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
! exec cue def ./a
2+
stderr 'panic: not a string label'
3+
4+
! exec cue def ./b
5+
stderr 'panic: not a string label'
6+
7+
! exec cue def ./c
8+
stderr 'panic: not a string label'
9+
10+
! exec cue def ./d
11+
stderr 'panic: not a string label'
12+
13+
-- cue.mod/module.cue --
14+
module: "test.example"
15+
language: version: "v0.11.0"
16+
17+
-- a/a.cue --
18+
package a
19+
20+
import #s "strings"
21+
22+
x: #s.ToUpper("foo")
23+
24+
-- b/b.cue --
25+
package b
26+
27+
import _s "strings"
28+
29+
x: _s.ToUpper("foo")
30+
31+
-- c/c.cue --
32+
package c
33+
34+
import "test.example/other1:_x"
35+
36+
_x
37+
38+
-- d/d.cue --
39+
package d
40+
41+
import "test.example/other2:#x"
42+
43+
#x
44+
45+
-- other1/other.cue --
46+
package _x
47+
48+
foo: "bar"
49+
50+
-- other2/other.cue --
51+
package #x
52+
53+
foo: "bar"

0 commit comments

Comments
 (0)