github.com/solo-io/cue@v0.4.7/cue/testdata/resolve/040_references_from_template_to_concrete.txtar (about)

     1  # DO NOT EDIT; generated by go run testdata/gen.go
     2  #
     3  #name: references from template to concrete
     4  #evalPartial
     5  -- in.cue --
     6  res: [t]
     7  t: [X=string]: {
     8  	a: c + b.str
     9  	b: str: string
    10  	c: "X"
    11  }
    12  t: x: {b: str: "DDDD"}
    13  -- out/def --
    14  res: [t]
    15  t: {
    16  	{[X=string]: {
    17  		a: c + b.str, c: "X", b: {
    18  			str:          string
    19  		}
    20  	}}
    21  	x: {
    22  		a: "XDDDD"
    23  		c: "X"
    24  		b: {
    25  			str: "DDDD"
    26  		}
    27  	}
    28  }
    29  -- out/export --
    30  res: [{
    31  	x: {
    32  		a: "XDDDD"
    33  		c: "X"
    34  		b: {
    35  			str: "DDDD"
    36  		}
    37  	}
    38  }]
    39  t: {
    40  	x: {
    41  		a: "XDDDD"
    42  		c: "X"
    43  		b: {
    44  			str: "DDDD"
    45  		}
    46  	}
    47  }
    48  -- out/yaml --
    49  res:
    50  - x:
    51      a: XDDDD
    52      c: X
    53      b:
    54        str: DDDD
    55  t:
    56    x:
    57      a: XDDDD
    58      c: X
    59      b:
    60        str: DDDD
    61  -- out/json --
    62  {"res":[{"x":{"a":"XDDDD","c":"X","b":{"str":"DDDD"}}}],"t":{"x":{"a":"XDDDD","c":"X","b":{"str":"DDDD"}}}}
    63  -- out/legacy-debug --
    64  <0>{res: [<1>{[]: <2>(X: string)-><3>{a: (<3>.c + <3>.b.str), c: "X", b: <4>{str: string}}, x: <5>{a: "XDDDD", c: "X", b: <6>{str: "DDDD"}}}], t: <7>{[]: <2>(X: string)-><3>{a: (<3>.c + <3>.b.str), c: "X", b: <4>{str: string}}, x: <8>{a: "XDDDD", c: "X", b: <9>{str: "DDDD"}}}}
    65  -- out/compile --
    66  --- in.cue
    67  {
    68    res: [
    69      〈0;t〉,
    70    ]
    71    t: {
    72      [string]: {
    73        a: (〈0;c〉 + 〈0;b〉.str)
    74        b: {
    75          str: string
    76        }
    77        c: "X"
    78      }
    79    }
    80    t: {
    81      x: {
    82        b: {
    83          str: "DDDD"
    84        }
    85      }
    86    }
    87  }
    88  -- out/eval --
    89  (struct){
    90    res: (#list){
    91      0: (struct){
    92        x: (struct){
    93          b: (struct){
    94            str: (string){ "DDDD" }
    95          }
    96          a: (string){ "XDDDD" }
    97          c: (string){ "X" }
    98        }
    99      }
   100    }
   101    t: (struct){
   102      x: (struct){
   103        b: (struct){
   104          str: (string){ "DDDD" }
   105        }
   106        a: (string){ "XDDDD" }
   107        c: (string){ "X" }
   108      }
   109    }
   110  }