cuelang.org/go@v0.13.0/tools/trim/testdata/9.txtar (about)

     1  This tests that we don't accidentally remove fields when conjuncts
     2  added by a pattern are more specific: jack, gill etc can be
     3  simplified, but must not be entirely removed.
     4  
     5  -- a.cue --
     6  a: 5
     7  s: { age: a }
     8  d: {
     9  	jack:    {age: 5},
    10  	gill:    {age: >4},
    11  	hilbert: {age: int},
    12  }
    13  d: [string]: s
    14  -- out/trim-v3 --
    15  == a.cue
    16  a: 5
    17  s: {age: a}
    18  d: {
    19  	jack:    _
    20  	gill:    _
    21  	hilbert: _
    22  }
    23  d: [string]: s
    24  -- diff/-out/trim-v3<==>+out/trim --
    25  diff old new
    26  --- old
    27  +++ new
    28  @@ -2,8 +2,8 @@
    29   a: 5
    30   s: {age: a}
    31   d: {
    32  -	jack: {}
    33  -	gill: {}
    34  -	hilbert: {}
    35  +	jack:    _
    36  +	gill:    _
    37  +	hilbert: _
    38   }
    39   d: [string]: s
    40  -- out/trim-v3-noshare --
    41  == a.cue
    42  a: 5
    43  s: {age: a}
    44  d: {
    45  	jack:    _
    46  	gill:    _
    47  	hilbert: _
    48  }
    49  d: [string]: s
    50  -- diff/-out/trim-v3-noshare<==>+out/trim --
    51  diff old new
    52  --- old
    53  +++ new
    54  @@ -2,8 +2,8 @@
    55   a: 5
    56   s: {age: a}
    57   d: {
    58  -	jack: {}
    59  -	gill: {}
    60  -	hilbert: {}
    61  +	jack:    _
    62  +	gill:    _
    63  +	hilbert: _
    64   }
    65   d: [string]: s
    66  -- out/trim --
    67  == a.cue
    68  a: 5
    69  s: {age: a}
    70  d: {
    71  	jack: {}
    72  	gill: {}
    73  	hilbert: {}
    74  }
    75  d: [string]: s