gs1_verify: 4308 no pcenc (gs1-format-spec.txt); GS1 General Spec 21.0.1

This commit is contained in:
gitlost 2021-01-28 23:41:54 +00:00
parent 94ece47f08
commit 538efd6e52
14 changed files with 239 additions and 249 deletions

View file

@ -135,7 +135,7 @@ static void test_helper_generate(const struct zint_symbol *symbol, int ret, int
}
}
// Replicate examples from GS1 General Specifications 20.0 and ISO/IEC 24723:2010
// Replicate examples from GS1 General Specifications 21.0.1 and ISO/IEC 24723:2010
static void test_examples(int index, int generate, int debug) {
testStart("");
@ -155,7 +155,7 @@ static void test_examples(int index, int generate, int debug) {
char *comment;
char *expected;
};
// Verified manually against GS1 General Specifications 20.0 (GGS) and ISO/IEC 24723:2010, with noted exceptions, and verified via bwipp_dump.ps against BWIPP
// Verified manually against GS1 General Specifications 21.0.1 (GGS) and ISO/IEC 24723:2010, with noted exceptions, and verified via bwipp_dump.ps against BWIPP
struct item data[] = {
/* 0*/ { BARCODE_DBAR_OMNSTK_CC, 1, "0401234567890", "[17]050101[10]ABC123", 0, 11, 56, "GSS Figure 5.1-5. GS1 DataBar Stacked Omnidirectional barcode with a Composite Component",
"01101100110101110001001100001000000110100111011110101001"
@ -170,7 +170,7 @@ static void test_examples(int index, int generate, int debug) {
"00001000110000101010000000101010111011001111000000000000"
"10100111001111010101111111000001000100110000110101000000"
},
/* 1*/ { BARCODE_DBAR_LTD_CC, 1, "1311234567890", "[17]010615[10]A123456", 0, 6, 79, "GGS Figure 5.9.2-1. (24723:2010 Figure 1) GS1 DataBar Limited Composite symbol with CC-A",
/* 1*/ { BARCODE_DBAR_LTD_CC, 1, "1311234567890", "[17]010615[10]A123456", 0, 6, 79, "GGS Figure 5.11.2-1. (24723:2010 Figure 1) GS1 DataBar Limited Composite symbol with CC-A",
"0111100010110110001010011000111110100110011101110100111100111011101001101000000"
"0100111110001101001010111000111101111010111101001111011100111011101011101000000"
"0100110011010000001010110000111001000110111101111011110010100011101011001000000"
@ -178,7 +178,7 @@ static void test_examples(int index, int generate, int debug) {
"0000001100000101010011001110101011010100110010101111000101100110100111000000000"
"0101110011111010101100110001010100101011001101010000111010011001011000010100000"
},
/* 2*/ { BARCODE_GS1_128_CC, 3, "[01]03812345678908", "[10]ABCD123456[410]3898765432108", 0, 7, 154, "GGS Figure 5.9.2-2. GS1-128 Composite symbol with CC-C **NOT SAME** as zint uses encodation '10', same if '0' forced",
/* 2*/ { BARCODE_GS1_128_CC, 3, "[01]03812345678908", "[10]ABCD123456[410]3898765432108", 0, 7, 154, "GGS Figure 5.11.2-2. GS1-128 Composite symbol with CC-C **NOT SAME** as zint uses encodation '10', same if '0' forced",
"1111111101010100011110101011110000111101011001111101110111110111010010000010000100010110010000101100001111011110110011011110101001111000111111101000101001"
"1111111101010100011111101010001110100001000111101001100101110010000011100001011000100100100111110110001011100001011111011111101010111000111111101000101001"
"1111111101010100011101010011111100110001111010001101000101011110000010001111101100010111101101111101001001011000111110011101010001111110111111101000101001"
@ -196,7 +196,7 @@ static void test_examples(int index, int generate, int debug) {
"0000000001011000110000101000100110010011010111000010110100001100010010001010001001110111101001100100100001001100100110100001000100001001001001110001010000"
"0000000110100111001111010111011001101100101000111101001011110011101101110101110110001000010110011011011110110011011001011110111011110110110110001110101100"
},
/* 4*/ { BARCODE_EANX_CC, 1, "331234567890", "[21]1234-abcd", 0, 7, 99, "GGS Figure 5.9.8-1. EAN-13 symbol with a four-column CC-A component (note [21] not [99])",
/* 4*/ { BARCODE_EANX_CC, 1, "331234567890", "[21]1234-abcd", 0, 7, 99, "GGS Figure 5.11.8-1. EAN-13 symbol with a four-column CC-A component (note [21] not [99])",
"110110111011010000100000110100110011101100001001110100100001011001100001100111000110001011011000101"
"110110110011000110111100010111011001110000101001100100100000010111101001101011100010000011001000101"
"110110100010011010001110000111111010001100101001100110111111010001101001010000011011111011101000101"
@ -214,7 +214,7 @@ static void test_examples(int index, int generate, int debug) {
"000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010"
"000101011110100110010011011010000100111010110001010101010000100010010010001110100111001010000101010"
},
/* 6*/ { BARCODE_UPCA_CC, 2, "61414101234", "[91]abcdefghijklmnopqrstuvwxyz", 0, 14, 99, "GGS Figure 5.9.8-2. UPC-A symbol with a four-column CC-B component **NOT SAME** (using [91] not [10] as length > 20 max for [10])",
/* 6*/ { BARCODE_UPCA_CC, 2, "61414101234", "[91]abcdefghijklmnopqrstuvwxyz", 0, 14, 99, "GGS Figure 5.11.8-2. UPC-A symbol with a four-column CC-B component **NOT SAME** (using [91] not [10] as length > 20 max for [10])",
"110001001010000001110010110110011111101100101001111010100100101111000001110101001111110011000100101"
"111001001011101110101000000111101101000111001011111010100011000110000101110011010000110011100100101"
"111101001011110110001101000111101000100000101011110010101001111001000001011111010001110011110100101"
@ -230,7 +230,7 @@ static void test_examples(int index, int generate, int debug) {
"000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010"
"000101010111100110010100011001100101000110011001010101110010110011011011001000010101110010000101010"
},
/* 7*/ { BARCODE_EANX_CC, -1, "1234567", "[21]A12345678", 0, 8, 72, "GGS Figure 5.9.8-3. (24723:2010 Figure 4) EAN-8 symbol with a three-column CC-A",
/* 7*/ { BARCODE_EANX_CC, -1, "1234567", "[21]A12345678", 0, 8, 72, "GGS Figure 5.11.8-3. (24723:2010 Figure 4) EAN-8 symbol with a three-column CC-A",
"101001111000001001010011000111110101110111101001101001111110011101001101"
"111110010011100101010111000101110011011100001111110100011001011101011101"
"110011001000010001010110000101000001000010001001000110110000011101011001"
@ -240,7 +240,7 @@ static void test_examples(int index, int generate, int debug) {
"000010000000000000000000000000000000000000000000000000000000000000000010"
"000010100110010010011011110101000110101010011101010000100010011100101010"
},
/* 8*/ { BARCODE_UPCE_CC, 1, "0121230", "[15]021231", 0, 9, 55, "GGS Figure 5.9.8-4. (24723:2010 Figure 3) UPC-E symbol with a two-column CC-A",
/* 8*/ { BARCODE_UPCE_CC, 1, "0121230", "[15]021231", 0, 9, 55, "GGS Figure 5.11.8-4. (24723:2010 Figure 3) UPC-E symbol with a two-column CC-A",
"1101100110111010011111010001100111100010110011110101001"
"1101101110110010010000110001101000011011100011100101001"
"1101101100111101001000000101000101111000010011101101001"
@ -251,14 +251,14 @@ static void test_examples(int index, int generate, int debug) {
"0001000000000000000000000000000000000000000000000000010"
"0001010110011001001100110010011011011110101001110101010"
},
/* 9*/ { BARCODE_DBAR_OMN_CC, 1, "0361234567890", "[11]990102", 0, 5, 100, "GGS Figure 5.9.8-5. (24723:2010 Figure 8) GS1 DataBar Omnidirectional symbol with a four-column CC-A",
/* 9*/ { BARCODE_DBAR_OMN_CC, 1, "0361234567890", "[11]990102", 0, 5, 100, "GGS Figure 5.11.8-5. (24723:2010 Figure 8) GS1 DataBar Omnidirectional symbol with a four-column CC-A",
"1101101110110000101000110001111001010111100010011101001110011101100110011001001100111000110110001010"
"1101101100110111011111001001000011010111111010011001001101000000111010010010111111001110110010001010"
"1101101000110010010111110001011001101111000010011001101111010011110010010000011001011100111010001010"
"0000000000010110001110100000000101001011010111111011001101010000011010000000010100101000110011110000"
"0000010011101001110001001111111000010100101000000100110010101111100101111111100011010111001100001101"
},
/*10*/ { BARCODE_DBAR_STK_CC, 1, "0341234567890", "[17]010200", 0, 9, 56, "GGS Figure 5.9.8-6. (24723:2010 Figure 6) GS1 DataBar Stacked symbol with a two-column CC-A",
/*10*/ { BARCODE_DBAR_STK_CC, 1, "0341234567890", "[17]010200", 0, 9, 56, "GGS Figure 5.11.8-6. (24723:2010 Figure 6) GS1 DataBar Stacked symbol with a two-column CC-A",
"01101100110101110011100111101010000100001111011110101001"
"01101101110110110001000010001110111101100100011100101001"
"01101101100110100001111011001111110011010110011101101001"
@ -269,7 +269,7 @@ static void test_examples(int index, int generate, int debug) {
"00000011010111101010000010101010101001001101010000000000"
"10101100111000010101111111110111000110110011100101000000"
},
/*11*/ { BARCODE_DBAR_LTD_CC, 2, "0351234567890", "[91]abcdefghijklmnopqrstuv", 0, 17, 88, "GGS Figure 5.9.8-7. (24723:2010 Figure 7) GS1 DataBar Limited symbol with a three-column CC-B **NOT SAME** (using [91] not [21] as length > 20 max for [21])",
/*11*/ { BARCODE_DBAR_LTD_CC, 2, "0351234567890", "[91]abcdefghijklmnopqrstuv", 0, 17, 88, "GGS Figure 5.11.8-7. (24723:2010 Figure 7) GS1 DataBar Limited symbol with a three-column CC-B **NOT SAME** (using [91] not [21] as length > 20 max for [21])",
"1101110100111011111011101001011000100100000100001000101111101101001111011011101001000000"
"1101100100111111010100111001011000110111101100001100101010000111100010011011001001000000"
"1101100110100111100001001001010000110111011100101111001101110010001110011011001101000000"
@ -288,14 +288,14 @@ static void test_examples(int index, int generate, int debug) {
"0000000000000111101110001101000111010101011010100110010111010010011100011010111000000000"
"0000000000101000010001110010111000101010100101011001101000101101100011100101000010100000"
},
/*12*/ { BARCODE_DBAR_EXP_CC, 1, "[01]93712345678904[3103]001234", "[91]1A2B3C4D5E", 0, 5, 151, "GGS Figure 5.9.8-8. (24723:2010 Figure 9) GS1 DataBar Expanded symbol with a four-column CC-A, same, verified against BWIPP and tec-it",
/*12*/ { BARCODE_DBAR_EXP_CC, 1, "[01]93712345678904[3103]001234", "[91]1A2B3C4D5E", 0, 5, 151, "GGS Figure 5.11.8-8. (24723:2010 Figure 9) GS1 DataBar Expanded symbol with a four-column CC-A, same, verified against BWIPP and tec-it",
"0011011011101110011010011000011100011100110110100111010011010001000011000101101110011000001101100010100000000000000000000000000000000000000000000000000"
"0011011011001101110111110100011010001111001100100110010010111111001001100100101111110011101100100010100000000000000000000000000000000000000000000000000"
"0011011010001010111011111100011111011011110010100110011011000011010011110100001011001111101110100010100000000000000000000000000000000000000000000000000"
"0000011011111011000100000000101001010000011101001110100110001100111101000010101000011010001110001000100001010000111001010000001010010111000110010110000"
"0101100100000100111011111111000010101111100010110001011001110011000010111100000011100101110001110111011110101111000110001111110000101000111001101000010"
},
/*13*/ { BARCODE_GS1_128_CC, 1, "[01]03212345678906", "[21]A1B2C3D4E5F6G7H8", 0, 6, 145, "GGS Figure 5.9.8-9. (24723:2010 Figure 11) GS1-128 symbol with a four-column CC-A",
/*13*/ { BARCODE_GS1_128_CC, 1, "[01]03212345678906", "[21]A1B2C3D4E5F6G7H8", 0, 6, 145, "GGS Figure 5.11.8-9. (24723:2010 Figure 11) GS1-128 symbol with a four-column CC-A",
"0000000000000000000001101001000110100001000001101101011110111110010010001101010000010010000011101110100010000111011001010000000000000000000000000"
"0000000000000000000001101011000110101111001100001111010001101100010010000101111000011001101011100101100001000110011001010000000000000000000000000"
"0000000000000000000001101011100100011001100111101011000101110000010110000101001100110011110011011110011001110110111001010000000000000000000000000"