Skip to content

Commit

Permalink
internal/core/export: assign a name to TestSelfContained
Browse files Browse the repository at this point in the history
For using a matrix to work properly, we need to have a
name assigned to the test.

Issue #3060

Signed-off-by: Marcel van Lohuizen <[email protected]>
Change-Id: Iab9518a898b849366ba79321cc80bf3bf6a89e1c
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1194183
Unity-Result: CUE porcuepine <[email protected]>
TryBot-Result: CUEcueckoo <[email protected]>
Reviewed-by: Daniel Martí <[email protected]>
  • Loading branch information
mpvl committed May 3, 2024
1 parent 9d3d545 commit 78e9e12
Show file tree
Hide file tree
Showing 18 changed files with 21 additions and 20 deletions.
1 change: 1 addition & 0 deletions internal/core/export/self_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import (

func TestSelfContained(t *testing.T) {
test := cuetxtar.TxTarTest{
Name: "self",
Root: "./testdata/selfcontained",
}

Expand Down
2 changes: 1 addition & 1 deletion internal/core/export/testdata/main/issue2584.txtar
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ F2: {
}
D: {}
let L = D
-- out/default --
-- out/self/default --
-- out/definition --

let L = D
Expand Down
2 changes: 1 addition & 1 deletion internal/core/export/testdata/selfcontained/alias.txtar
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ a: B=b: {
}

[NAME=string]: b: name: NAME
-- out/default --
-- out/self/default --

{
x: string
Expand Down
2 changes: 1 addition & 1 deletion internal/core/export/testdata/selfcontained/alldef.txtar
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ is already a definition.
}

#a: b: c: #def
-- out/default --
-- out/self/default --

_#def
_#def: {
Expand Down
2 changes: 1 addition & 1 deletion internal/core/export/testdata/selfcontained/call.txtar
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ a: b: {
d: {}
}

-- out/default --
-- out/self/default --
import "struct"

// Do not inline `s`, as it makes calls less readable.
Expand Down
2 changes: 1 addition & 1 deletion internal/core/export/testdata/selfcontained/def.txtar
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
}

a: b: c: #def
-- out/default --
-- out/self/default --
c: DEF.#x

//cue:path: #def
Expand Down
2 changes: 1 addition & 1 deletion internal/core/export/testdata/selfcontained/errors.txtar
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ y: "b"
z: string
m: {}
n: {foo: {baz: int}}
-- out/default --
-- out/self/default --
// comprehensions
t1: {
for p in B let x = C if D {}
Expand Down
4 changes: 2 additions & 2 deletions internal/core/export/testdata/selfcontained/import.txtar
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ w: {
}
}

-- out/default --
-- out/self/default --
import (
"mod.test/a/pkg"
"tool/exec"
Expand All @@ -74,7 +74,7 @@ wa: pkg.w.a
// Never expand builtin packages.
run: exec.Run
_hidden: int
-- out/expand_imports --
-- out/self/expand_imports --
import "tool/exec"

// Can be inlined.
Expand Down
4 changes: 2 additions & 2 deletions internal/core/export/testdata/selfcontained/issue2247.txtar
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ q: {

r: {out: k: l: string}.out

-- out/default --
-- out/self/default --
import "example.com/t"

f: t.p
-- out/expand_imports --
-- out/self/expand_imports --
f: {
c: [int]
d: [c][0]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
-- x.cue --
a: _
b: [a][0]
-- out/default --
-- out/self/default --
a: _
b: [a][0]
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ root: {
a: [{
s: t: string
}]
-- out/default --
-- out/self/default --
b: Index0_1
c: Index0_1
Index0: int
Expand Down
2 changes: 1 addition & 1 deletion internal/core/export/testdata/selfcontained/issue867.txtar
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
-- in.cue --
t: {name: string}
output: [...t]
-- out/default --
-- out/self/default --

[...{
name: string
Expand Down
2 changes: 1 addition & 1 deletion internal/core/export/testdata/selfcontained/nochange.txtar
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ a: b: {
-- out/selfcontained --
c: 1
d: 2
-- out/default --
-- out/self/default --
c: 1
d: 2
2 changes: 1 addition & 1 deletion internal/core/export/testdata/selfcontained/ref.txtar
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ a: b: {

ref6: y.z.map[incomplete2] // inline the single-use map.
}
-- out/default --
-- out/self/default --
ref1: MAP
ref2: MAP.foo
ref3: MAP[INCOMPLETE1]
Expand Down
4 changes: 2 additions & 2 deletions internal/core/export/testdata/selfcontained/rootimport.txtar
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ v: {
b: a
}

-- out/default --
-- out/self/default --
import "mod.test/a/pkg"

a: pkg

// Force no inline.
b: pkg.v.a
-- out/expand_imports --
-- out/self/expand_imports --
a: PKG

// Force no inline.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ a: b: {
s: string
t: b.s
}
-- out/default --
-- out/self/default --
c: "out"
// TODO: should most likely resolve to "out", not c, because b points to
// outside the exported value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ a: b: {
d: {}
}

-- out/default --
-- out/self/default --
import "struct"

c: struct.MaxFields(S, 3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ a: {
}
b: {}
}
-- out/default --
-- out/self/default --

{
k2: "test"
Expand Down

0 comments on commit 78e9e12

Please sign in to comment.