...

Text file src/cuelang.org/go/tools/trim/testdata/optional.txtar

Documentation: cuelang.org/go/tools/trim/testdata

     1// Optional fields should retain status after removal of unified
     2// content.
     3
     4// Issue #855
     5
     6-- cue.mod/module.cue --
     7module: "mod.test"
     8-- a.cue --
     9package pkg
    10
    11a: [...#A]
    12
    13a: [{
    14	annotations: {}
    15}]
    16
    17#A: annotations?: [string]: string
    18
    19b: #B
    20b: bb: c:   2 // c can be removed, bb not.
    21#B: bb?: c: 2
    22-- out/trim --
    23== a.cue
    24package pkg
    25
    26a: [...#A]
    27
    28a: [{
    29	annotations: {}
    30}]
    31
    32#A: annotations?: [string]: string
    33
    34b:        #B
    35b: bb: {} // c can be removed, bb not.
    36#B: bb?: c: 2

View as plain text