add test exercising steps/scenarios
This commit is contained in:
parent
986f069c18
commit
424f671d54
2 changed files with 1202 additions and 0 deletions
|
|
@ -84,6 +84,21 @@ label: meow`,
|
|||
assertQuery(t, m, 0, 0, "root.layers.x.layers.y", "layers.x.y.link")
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "steps-inheritence",
|
||||
run: func(t testing.TB) {
|
||||
m, err := compileFS(t, "index.d2", map[string]string{
|
||||
"index.d2": `z; steps: { 1: @x; 2: @y }; scenarios: { x: @x; y: @y }`,
|
||||
"x.d2": `a`,
|
||||
"y.d2": `b`,
|
||||
})
|
||||
assert.Success(t, err)
|
||||
assertQuery(t, m, 2, 0, nil, "scenarios.x")
|
||||
assertQuery(t, m, 2, 0, nil, "scenarios.y")
|
||||
assertQuery(t, m, 2, 0, nil, "steps.1")
|
||||
assertQuery(t, m, 3, 0, nil, "steps.2")
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "spread",
|
||||
run: func(t testing.TB) {
|
||||
|
|
|
|||
1187
testdata/d2ir/TestCompile/imports/steps-inheritence.exp.json
generated
vendored
Normal file
1187
testdata/d2ir/TestCompile/imports/steps-inheritence.exp.json
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue