Skip to content

Commit 083afe7

Browse files
committed
all: update most tests to not use ::
Change-Id: I0356417bab7b68b1f6bd8c540902fc049f078cd8 Reviewed-on: https://cue-review.googlesource.com/c/cue/+/6200 Reviewed-by: Marcel van Lohuizen <[email protected]>
1 parent 3e62450 commit 083afe7

33 files changed

+454
-466
lines changed

cmd/cue/cmd/testdata/script/cmd_dep.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import (
1414
)
1515

1616
foo: {
17-
a :: string
18-
b: a
17+
#a: string
18+
b: #a
1919
}
2020

2121
command: do: {
@@ -25,7 +25,7 @@ command: do: {
2525
}
2626
outputs: print: cli.Print & {
2727
text: json.Marshal(foo & {
28-
a :: strings.TrimSpace(inputs.name.stdout)
28+
#a: strings.TrimSpace(inputs.name.stdout)
2929
})
3030
}
3131
}

cmd/cue/cmd/testdata/script/cmd_echo.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ stdout 'Hello World!'
44
-- data.cue --
55
package hello
66

7-
who :: "World"
7+
_who: "World"
88
-- hello.cue --
99
package hello
1010

11-
message: "Hello \(who)!" // who declared in data.cue
11+
message: "Hello \(_who)!" // who declared in data.cue
1212
-- hello_tool.cue --
1313
package hello
1414

cmd/cue/cmd/testdata/script/cmd_print.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ command: print: {
2424
stdout: string
2525
}
2626
print: cli.Print & {
27-
text: (f & {arg: runs.t1.stdout + runs.t2.stdout}).result
27+
text: (#f & {arg: runs.t1.stdout + runs.t2.stdout}).result
2828
}
2929
}
3030

31-
f :: {
31+
#f: {
3232
arg: string
3333
result: strings.Join(strings.Split(arg, ""), ".")
3434
}

cmd/cue/cmd/testdata/script/cmd_run.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ message: "Hello world!"
88
-- task_tool.cue --
99
package home
1010

11-
command: run: RunBase & {
11+
command: run: #RunBase & {
1212
task: echo: cmd: "echo \(message)"
1313
}
1414

@@ -22,7 +22,7 @@ import (
2222

2323
// deliberately put in another file to test resolving top-level identifiers
2424
// in different files.
25-
RunBase :: {
25+
#RunBase: {
2626
task: echo: exec.Run & {
2727
stdout: string
2828
}

cmd/cue/cmd/testdata/script/def_basic.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ cmp stdout expect-stdout2
88
// foo
99
package foo
1010

11-
A :: {
11+
#A: {
1212
// a is an integer
1313
a: int
1414
b: { c: int } // TODO: should we _not_ simplify?
@@ -22,7 +22,7 @@ A :: {
2222
// foo
2323
package foo
2424

25-
A :: {
25+
#A: {
2626
// a is an integer
2727
a: int
2828
b: c: int

cmd/cue/cmd/testdata/script/def_openapi.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ cmp stdout expect-cue3
2929

3030
$version: "v1"
3131

32-
Foo :: {
32+
#Foo: {
3333
a: int
3434
b: uint & <10
3535
}
3636

37-
Bar :: {
38-
foo: Foo
37+
#Bar: {
38+
foo: #Foo
3939
}
4040

4141
-- openapi.json --

cmd/cue/cmd/testdata/script/eval_concrete.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ Hello World!
1414
-- data.cue --
1515
package hello
1616

17-
who :: "World"
17+
#who: "World"
1818
-- hello.cue --
1919
package hello
2020

21-
message: "Hello \(who)!" // who declared in data.cue
21+
message: "Hello \(#who)!" // who declared in data.cue

cmd/cue/cmd/testdata/script/eval_import.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ cmp stdout expect-stdout
44
import "list"
55

66
def: {
7-
types :: list.MinItems(1)
7+
#types: list.MinItems(1)
88
}
99
-- in.cue --
1010
import (
1111
"list"
1212
)
1313

14-
def: types :: list.MinItems(1)
14+
def: #types: list.MinItems(1)
1515

cmd/cue/cmd/testdata/script/export.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ cmp stdout expect-stdout
88
-- hello/data.cue --
99
package hello
1010

11-
who :: "World"
11+
#who: "World"
1212
-- hello/hello.cue --
1313
package hello
1414

1515
$type: "demo"
16-
message: "Hello \(who)!" // who declared in data.cue
16+
message: "Hello \(#who)!" // who declared in data.cue
1717
-- hello/cue.mod --

cmd/cue/cmd/testdata/script/export_yaml.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ test: {}
66
-- hello/data.cue --
77
package hello
88

9-
who :: "World"
9+
_who: "World"
1010
-- hello/hello.cue --
1111
package hello
1212

13-
message: "Hello \(who)!" // who declared in data.cue
13+
message: "Hello \(_who)!" // who declared in data.cue
1414

1515
test: {
1616
_foo: string // technically in error, but test anyway.

0 commit comments

Comments
 (0)