From d8851feb7f18ea3dd9dc329be0016bd54d37150f Mon Sep 17 00:00:00 2001 From: kousu Date: Mon, 1 Apr 2019 21:32:32 -0400 Subject: [PATCH] Test raw binary data. Many QR decoders do not handle this case well. The source of this was a public domain sound sample, clipped to fit into a QR code: $ curl "https://sampleswap.org//samples-ghost/DRUM%20LOOPS%20and%20BREAKS/161%20to%20180%20bpm/128\[kb\]161_amenvar3.aif.mp3" | head -c 300 | qrencode -8 -v 10 -o embedded-nul/input.png --- tests/end-to-end/embedded-nul/input.png | Bin 0 -> 1123 bytes tests/end-to-end/embedded-nul/output.json | 647 ++++++++++++++++++++++ tests/end-to-end/report.json | 5 +- 3 files changed, 650 insertions(+), 2 deletions(-) create mode 100644 tests/end-to-end/embedded-nul/input.png create mode 100644 tests/end-to-end/embedded-nul/output.json diff --git a/tests/end-to-end/embedded-nul/input.png b/tests/end-to-end/embedded-nul/input.png new file mode 100644 index 0000000000000000000000000000000000000000..9b19cb92e8b4f8006696965a911dfa145e3fed12 GIT binary patch literal 1123 zcmV-p1f2VcP)dJEkNjpicr;O57<80ZKsHX(6cQl-%7j7+?nPmAB6@8g3oK zl#5mOURv}&AMywNDq2OJT8+~(>LEGmv}}7V65VLiqYd*zt6sP`w>ge`-RTFY)KBH2 z_DRoFtzlWEZo+41s++_T$D-$$z)&xvi~uT^8)k2dpf^rKYueEzib za-@(p|1vO(a0vc5wde}rp|tJhB)l>{G}e~BzL~YK1DY&FOcPx)qEi_ zq&m`C;zwto2&{E*=c-7$P5P+nMpkFJF#gCZEaldR@Ff!FL(^`G_0HM7)njCpG<_X!{ zCUqm!n>w7KejsjE6YSeEh8y91TVZzUduCB~&1$=fx{>bq7lTt-Sth;OiTXr0+Di4p zXcT$;j*eRO!H5_)<0((h~b%EjnBwT-8Q?-2I5P+F)s_3D!|vp|zO(=ti44H37bQ(eS|n6@&ly z0AVgnH*HC@7)?VEA{}-=+9pK9^yf}gF7|>D_0?=Hv|{>dS~Sq2!lIX+XFuBZYUQ}0 zhz}QQy7W1bsnm@Sv<|sQYH5JQcNUdi;m+ZMDL{ML(I!7(L&Ybu!kvd zIl2=4h|MB9VKeVFs;N1WO?m}hz(Qy}jlYgnzi5f38S zFri2$k_}Nje5Yj>;^f=ud)Vy|Z9Shjt^1Lk&Fx8HS;9o=by=++6&oDOv_B``AYXaj zi<(TBuk5E7x}9%9PSekj9kLcHZ?Nb{S{}Y{-h&jQF{kEe*_de9q4J%UeTe;P?5811 p;5R4@@Q&hM^gq9|{XxHk{sPo~`lS>|O}PL7002ovPDHLkV1o7kC`SMQ literal 0 HcmV?d00001 diff --git a/tests/end-to-end/embedded-nul/output.json b/tests/end-to-end/embedded-nul/output.json new file mode 100644 index 00000000..9acac625 --- /dev/null +++ b/tests/end-to-end/embedded-nul/output.json @@ -0,0 +1,647 @@ +{ + "binaryData": [ + 255, + 243, + 128, + 196, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 88, + 105, + 110, + 103, + 0, + 0, + 0, + 15, + 0, + 0, + 0, + 60, + 0, + 0, + 32, + 235, + 0, + 4, + 13, + 13, + 17, + 17, + 21, + 25, + 25, + 29, + 29, + 34, + 37, + 37, + 42, + 42, + 45, + 49, + 49, + 53, + 53, + 56, + 60, + 60, + 64, + 64, + 70, + 75, + 75, + 79, + 79, + 83, + 86, + 86, + 90, + 90, + 94, + 104, + 104, + 114, + 114, + 117, + 121, + 121, + 125, + 125, + 129, + 132, + 132, + 136, + 136, + 140, + 144, + 144, + 148, + 148, + 152, + 155, + 155, + 159, + 159, + 163, + 167, + 167, + 172, + 172, + 176, + 181, + 181, + 185, + 185, + 189, + 193, + 193, + 198, + 198, + 202, + 205, + 205, + 209, + 209, + 213, + 217, + 217, + 221, + 221, + 226, + 229, + 229, + 233, + 233, + 237, + 241, + 241, + 245, + 245, + 249, + 255, + 255, + 255, + 0, + 0, + 0, + 57, + 76, + 65, + 77, + 69, + 51, + 46, + 57, + 57, + 114, + 2, + 105, + 0, + 0, + 0, + 0, + 46, + 46, + 0, + 0, + 20, + 40, + 36, + 4, + 31, + 66, + 0, + 0, + 40, + 0, + 0, + 32, + 235, + 56, + 85, + 255, + 236, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 255, + 243, + 80, + 196, + 0, + 24, + 155, + 30, + 164, + 1, + 67, + 40, + 0, + 46, + 187, + 185, + 253, + 119, + 115, + 230, + 224, + 2, + 19, + 244, + 220, + 56, + 28, + 35, + 116, + 33, + 206, + 115, + 191, + 232, + 66, + 103, + 57, + 9, + 83, + 156, + 249, + 222, + 132, + 33, + 50, + 16, + 132, + 20, + 33, + 27, + 144, + 132, + 33, + 27, + 161, + 8, + 79, + 212, + 231, + 58, + 16, + 62, + 1, + 128, + 97, + 240, + 248, + 187, + 161, + 3, + 225, + 243, + 191, + 252, + 231, + 59, + 255, + 242, + 16, + 132, + 243, + 188, + 132, + 33, + 42, + 66, + 16, + 132, + 33, + 9, + 245, + 57 + ], + "data": "", + "chunks": [ + { + "type": "byte", + "bytes": [ + 255, + 243, + 128, + 196, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 88, + 105, + 110, + 103, + 0, + 0, + 0, + 15, + 0, + 0, + 0, + 60, + 0, + 0, + 32, + 235, + 0, + 4, + 13, + 13, + 17, + 17, + 21, + 25, + 25, + 29, + 29, + 34, + 37, + 37, + 42, + 42, + 45, + 49, + 49, + 53, + 53, + 56, + 60, + 60, + 64, + 64, + 70, + 75, + 75, + 79, + 79, + 83, + 86, + 86, + 90, + 90, + 94, + 104, + 104, + 114, + 114, + 117, + 121, + 121, + 125, + 125, + 129, + 132, + 132, + 136, + 136, + 140, + 144, + 144, + 148, + 148, + 152, + 155, + 155, + 159, + 159, + 163, + 167, + 167, + 172, + 172, + 176, + 181, + 181, + 185, + 185, + 189, + 193, + 193, + 198, + 198, + 202, + 205, + 205, + 209, + 209, + 213, + 217, + 217, + 221, + 221, + 226, + 229, + 229, + 233, + 233, + 237, + 241, + 241, + 245, + 245, + 249, + 255, + 255, + 255, + 0, + 0, + 0, + 57, + 76, + 65, + 77, + 69, + 51, + 46, + 57, + 57, + 114, + 2, + 105, + 0, + 0, + 0, + 0, + 46, + 46, + 0, + 0, + 20, + 40, + 36, + 4, + 31, + 66, + 0, + 0, + 40, + 0, + 0, + 32, + 235, + 56, + 85, + 255, + 236, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 255, + 243, + 80, + 196, + 0, + 24, + 155, + 30, + 164, + 1, + 67, + 40, + 0, + 46, + 187, + 185, + 253, + 119, + 115, + 230, + 224, + 2, + 19, + 244, + 220, + 56, + 28, + 35, + 116, + 33, + 206, + 115, + 191, + 232, + 66, + 103, + 57, + 9, + 83, + 156, + 249, + 222, + 132, + 33, + 50, + 16, + 132, + 20, + 33, + 27, + 144, + 132, + 33, + 27, + 161, + 8, + 79, + 212, + 231, + 58, + 16, + 62, + 1, + 128, + 97, + 240, + 248, + 187, + 161, + 3, + 225, + 243, + 191, + 252, + 231, + 59, + 255, + 242, + 16, + 132, + 243, + 188, + 132, + 33, + 42, + 66, + 16, + 132, + 33, + 9, + 245, + 57 + ], + "text": "" + } + ], + "location": { + "topRightCorner": { + "x": 195, + "y": 12 + }, + "topLeftCorner": { + "x": 12, + "y": 12 + }, + "bottomRightCorner": { + "x": 195, + "y": 195 + }, + "bottomLeftCorner": { + "x": 12, + "y": 195 + }, + "topRightFinderPattern": { + "x": 184.5, + "y": 22.5 + }, + "topLeftFinderPattern": { + "x": 22.5, + "y": 22.5 + }, + "bottomLeftFinderPattern": { + "x": 22.5, + "y": 184.5 + }, + "bottomRightAlignmentPattern": { + "x": 175.5, + "y": 175.5 + } + } +} \ No newline at end of file diff --git a/tests/end-to-end/report.json b/tests/end-to-end/report.json index 24fb4f5b..d7203f32 100644 --- a/tests/end-to-end/report.json +++ b/tests/end-to-end/report.json @@ -1,7 +1,7 @@ { "counts": { - "failed": 47, - "successful": 207 + "failed": 48, + "successful": 208 }, "tests": { "0": true, @@ -211,6 +211,7 @@ "cupcake-3": true, "cupcake-4": true, "damaged": false, + "embedded-nul": true, "emblem-patch": false, "hk-ikea": true, "hudson-highlands-state-park": true,