github.com/solo-io/cue@v0.4.7/encoding/protobuf/textproto/testdata/decoder/list.txtar (about)

     1  // test of non-standard list
     2  
     3  // TODO: there are many missing comments, but these really are consequences
     4  // of the buggy textpbfmt library.
     5  
     6  -- list.cue --
     7  empty1: [...int]
     8  empty2: [...int]
     9  
    10  int1: [...int]
    11  int2: [...int]
    12  int3: [...int]
    13  
    14  string1: [...string]
    15  
    16  float1: [...number]
    17  
    18  
    19  -- input.textproto --
    20  empty1: []
    21  empty2: [ # foo
    22  ]
    23  
    24  int1: [1, 2]
    25  int2: [1 2]  # omitting commas okay
    26  int3: [
    27      1 # omitting comma okay
    28      2
    29  ]
    30  
    31  string1: [
    32      "a",  # omitting comma NOT supported
    33      "b"
    34  ]
    35  
    36  float1: [ 1e+2 1. 0]
    37  -- out/decode --
    38  empty1: []
    39  empty2: [ // foo
    40  ]
    41  int1: [1, 2]
    42  int2: [1, 2] // omitting commas okay
    43  int3: [1, // omitting comma okay
    44  		2]
    45  string1: ["a", // omitting comma NOT supported
    46  		"b"]
    47  float1: [1e+2, 1.0, 0]