(t *testing.T)
| 5235 | } |
| 5236 | |
| 5237 | func TestUnmarshalerInterfaceFixedArrayElements(t *testing.T) { |
| 5238 | doc := ` |
| 5239 | [[item]] |
| 5240 | a = 1 |
| 5241 | [[item]] |
| 5242 | a = 2 |
| 5243 | ` |
| 5244 | type target struct { |
| 5245 | Item [2]rawRecorder |
| 5246 | } |
| 5247 | x := target{} |
| 5248 | assert.NoError(t, decodeRaw(t, doc, &x)) |
| 5249 | assert.True(t, strings.Contains(x.Item[0].Raw, "a = 1")) |
| 5250 | assert.True(t, strings.Contains(x.Item[1].Raw, "a = 2")) |
| 5251 | } |
| 5252 | |
| 5253 | func TestUnmarshalerInterfaceKeyValueTargets(t *testing.T) { |
| 5254 | doc := ` |