...

Text file src/cuelang.org/go/cue/testdata/fulleval/040.txtar

Documentation: cuelang.org/go/cue/testdata/fulleval

     1# DO NOT EDIT; generated by go run testdata/gen.go
     2#
     3#evalFull
     4-- in.cue --
     5#Task: {
     6	{
     7		op:          "pull"
     8		tag:         *"latest" | string
     9		refToTag:    tag
    10		tagExpr:     tag + "dd"
    11		tagInString: "\(tag)"
    12	} | {
    13		op: "scratch"
    14	}
    15}
    16
    17foo: #Task & {"op": "pull"}
    18-- out/def --
    19#Task: {
    20	op:          "pull"
    21	tag:         *"latest" | string
    22	refToTag:    tag
    23	tagExpr:     "latestdd"
    24	tagInString: "latest"
    25} | {
    26	op: "scratch"
    27}
    28foo: #Task & {
    29	op: "pull"
    30}
    31-- out/export --
    32foo: {
    33	op:          "pull"
    34	tag:         "latest"
    35	refToTag:    "latest"
    36	tagExpr:     "latestdd"
    37	tagInString: "latest"
    38}
    39-- out/yaml --
    40foo:
    41  op: pull
    42  tag: latest
    43  refToTag: latest
    44  tagExpr: latestdd
    45  tagInString: latest
    46-- out/json --
    47{"foo":{"op":"pull","tag":"latest","refToTag":"latest","tagExpr":"latestdd","tagInString":"latest"}}
    48-- out/legacy-debug --
    49<0>{#Task: (<1>C{op: "pull", tag: (*"latest" | string), refToTag: <1>.tag, tagExpr: (<1>.tag + "dd"), tagInString: ""+<1>.tag+""} | <2>C{op: "scratch"}), foo: <3>C{op: "pull", tag: "latest", refToTag: "latest", tagExpr: "latestdd", tagInString: "latest"}}
    50-- out/compile --
    51--- in.cue
    52{
    53  #Task: {
    54    ({
    55      op: "pull"
    56      tag: (*"latest"|string)
    57      refToTag: 〈0;tag〉
    58      tagExpr: (〈0;tag〉 + "dd")
    59      tagInString: "\(〈0;tag〉)"
    60    }|{
    61      op: "scratch"
    62    })
    63  }
    64  foo: (〈0;#Task〉 & {
    65    op: "pull"
    66  })
    67}
    68-- out/eval/stats --
    69Leaks:  0
    70Freed:  27
    71Reused: 21
    72Allocs: 6
    73Retain: 0
    74
    75Unifications: 15
    76Conjuncts:    35
    77Disjuncts:    27
    78-- out/eval --
    79(struct){
    80  #Task: (#struct){ |((#struct){
    81      op: (string){ "pull" }
    82      tag: (string){ |(*(string){ "latest" }, (string){ string }) }
    83      refToTag: (string){ |(*(string){ "latest" }, (string){ string }) }
    84      tagExpr: (string){ "latestdd" }
    85      tagInString: (string){ "latest" }
    86    }, (#struct){
    87      op: (string){ "scratch" }
    88    }) }
    89  foo: (#struct){
    90    op: (string){ "pull" }
    91    tag: (string){ |(*(string){ "latest" }, (string){ string }) }
    92    refToTag: (string){ |(*(string){ "latest" }, (string){ string }) }
    93    tagExpr: (string){ "latestdd" }
    94    tagInString: (string){ "latest" }
    95  }
    96}

View as plain text