Skip to content

Commit

Permalink
cmd/cue: add test for 3646
Browse files Browse the repository at this point in the history
Issue #3646

Signed-off-by: Marcel van Lohuizen <[email protected]>
Change-Id: Iff6774ef8219fec53afe355c51b088681bc35f61
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1207401
Reviewed-by: Daniel Martí <[email protected]>
TryBot-Result: CUEcueckoo <[email protected]>
Unity-Result: CUE porcuepine <[email protected]>
  • Loading branch information
mpvl committed Jan 21, 2025
1 parent bdc2929 commit 18f0ae8
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions cmd/cue/cmd/testdata/script/def_issue3646.txtar
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
exec cue def --inline-imports ./p1
stdin stdout

# TODO Fix this test
! exec cue eval --out=json -
cmp stdout stdout.golden

-- go.mod --
module mod.example

require cuelang.org/go v0.11.1
-- deps.go --
package deps

import _ "cuelang.org/go/cmd/cue"
-- cue.mod/module.cue --
module: "example.com/def"
language: {
version: "v0.9.2"
}
-- p1/caller.cue --
package p1

import (
"example.com/def/p2"
)

r: "us-east-1"
shortRegionName: p2.regionMap[r]

-- p2/callee.cue --
package p2

#RegionMap: {
"us-east-1": "ue1"
"us-west_1": "uw1"
}

regionMap: #RegionMap
-- stdout.golden --

0 comments on commit 18f0ae8

Please sign in to comment.