From 4112921d733e2cf21b0159bb8b215d9e198b36af Mon Sep 17 00:00:00 2001 From: Anders Bergh Date: Wed, 12 Apr 2017 12:34:41 +0200 Subject: [PATCH] code128: Test Datalogic programming barcodes. Tests new 128A support. --- code128/encode_test.go | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/code128/encode_test.go b/code128/encode_test.go index 68b2c05..70b9d50 100644 --- a/code128/encode_test.go +++ b/code128/encode_test.go @@ -101,3 +101,31 @@ func Test_Issue16(t *testing.T) { } testEncode(t, string(FNC3)+"$P\rI", "110100001001011110001010010001100111011101101111011101011000100010110001010001100011101011") } + +func Test_Datalogic(t *testing.T) { + // $P\r + testEncode(t, string(FNC3)+"$P\r", + "11010000100"+ // + "10111100010"+ // + "10010001100"+ // $ + "11101110110"+ // P + "11110111010"+ // CR + "11000100010"+ // checksum = 'I' + "1100011101011") // STOP + + // $P,Ae,P + testEncode(t, string(FNC3)+"$P,Ae,P\r", + "11010010000"+ // + "10111100010"+ // + "10010001100"+ // $ + "11101110110"+ // P + "10110011100"+ // , + "10100011000"+ // A + "10110010000"+ // e + "10110011100"+ // , + "11101110110"+ // P + "11101011110"+ // + "11110111010"+ // + "10110001000"+ // checksum = 'D' + "1100011101011") // STOP +}