github.com/solo-io/cue@v0.4.7/cue/testdata/interpolation/incomplete.txtar (about)

     1  Issue #553
     2  
     3  -- in.cue --
     4  a: "foo"
     5  b: "boo"
     6  commands: {
     7      #c: {
     8          help: "help!"
     9      }
    10  }
    11  out: """
    12      a is \(a)
    13      b is \(b)
    14  
    15      c is \(commands.#c.help)
    16      d is \(commands.#d.help)
    17      """
    18  -- out/eval --
    19  (struct){
    20    a: (string){ "foo" }
    21    b: (string){ "boo" }
    22    commands: (struct){
    23      #c: (#struct){
    24        help: (string){ "help!" }
    25      }
    26    }
    27    out: (_|_){
    28      // [incomplete] out: invalid interpolation: undefined field: #d:
    29      //     ./in.cue:8:6
    30      //     ./in.cue:13:21
    31    }
    32  }
    33  -- out/compile --
    34  --- in.cue
    35  {
    36    a: "foo"
    37    b: "boo"
    38    commands: {
    39      #c: {
    40        help: "help!"
    41      }
    42    }
    43    out: "a is \(〈0;a〉)
    44    b is \(〈0;b〉)
    45    
    46    c is \(〈0;commands〉.#c.help)
    47    d is \(〈0;commands〉.#d.help)"
    48  }