Merge pull request #18 from anders/datalogic
code128: Test Datalogic programming barcodes.
This commit is contained in:
commit
9fb68fa6ca
|
@ -101,3 +101,31 @@ func Test_Issue16(t *testing.T) {
|
|||
}
|
||||
testEncode(t, string(FNC3)+"$P\rI", "110100001001011110001010010001100111011101101111011101011000100010110001010001100011101011")
|
||||
}
|
||||
|
||||
func Test_Datalogic(t *testing.T) {
|
||||
// <Start A><FNC3>$P\r<checksum><STOP>
|
||||
testEncode(t, string(FNC3)+"$P\r",
|
||||
"11010000100"+ // <Start A>
|
||||
"10111100010"+ // <FNC3>
|
||||
"10010001100"+ // $
|
||||
"11101110110"+ // P
|
||||
"11110111010"+ // CR
|
||||
"11000100010"+ // checksum = 'I'
|
||||
"1100011101011") // STOP
|
||||
|
||||
// <Start B><FNC3>$P,Ae,P<CR><checksum><STOP>
|
||||
testEncode(t, string(FNC3)+"$P,Ae,P\r",
|
||||
"11010010000"+ // <Start B>
|
||||
"10111100010"+ // <FNC3>
|
||||
"10010001100"+ // $
|
||||
"11101110110"+ // P
|
||||
"10110011100"+ // ,
|
||||
"10100011000"+ // A
|
||||
"10110010000"+ // e
|
||||
"10110011100"+ // ,
|
||||
"11101110110"+ // P
|
||||
"11101011110"+ // <Code A>
|
||||
"11110111010"+ // <CR>
|
||||
"10110001000"+ // checksum = 'D'
|
||||
"1100011101011") // STOP
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue