From d1be16784be01f8414ff27979bc0b3db76cb0523 Mon Sep 17 00:00:00 2001 From: Mattias Wadman Date: Mon, 9 Aug 2021 15:55:49 +0200 Subject: [PATCH] Add decode struct each order test --- pkg/interp/testdata/value.fqtest | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/pkg/interp/testdata/value.fqtest b/pkg/interp/testdata/value.fqtest index cc407351..9d6bb008 100644 --- a/pkg/interp/testdata/value.fqtest +++ b/pkg/interp/testdata/value.fqtest @@ -698,3 +698,24 @@ false "size": 35, "version": 4 } +# test each in decoded order +> fq -d mp3 '.headers[0][]' /test.mp3 + |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f| | +0x0|49 44 33 |ID3 |.headers[0].magic: "ID3" (Correct) + |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f| | +0x0| 04 | . |.headers[0].version: 4 + |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f| | +0x0| 00 | . |.headers[0].revision: 0 + |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f| |.headers[0].flags: {} +0x0| 00 | . | unsynchronisation: false +0x0| 00 | . | extended_header: false +0x0| 00 | . | experimental_indicator: false +0x0| 00 | . | unused: 0 + |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f| | +0x0| 00 00 00 23 | ...# |.headers[0].size: 35 + |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f| |.headers[0].frames: [1] +0x00| 54 53 53 45 00 00| TSSE..| [0]: {} +0x10|00 0f 00 00 03 4c 61 76 66 35 38 2e 34 35 2e 31|.....Lavf58.45.1| +0x20|30 30 00 |00. | + |00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f| | +0x20| 00 00 00 00 00 00 00 00 00 00 | .......... |.headers[0].padding: Correct (none) (zero padding)