mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-27 13:34:19 -04:00
- Add new symbology BARCODE_UPU_S10
- PZN: allow check digit to be given; add space after hyphen in HRT; PZN7 option - backend_qt: add `encodedHeight()` read-only
This commit is contained in:
parent
25dacb2949
commit
53769c6ed1
35 changed files with 1314 additions and 852 deletions
|
@ -283,36 +283,36 @@ static void test_2d_input(const testCtx *const p_ctx) {
|
|||
/* 1*/ { -1, "012100123412345678ab19xy1a 0", 0, 24, 24, "" }, /* Converts to upper */
|
||||
/* 2*/ { -1, "jgb 012100123412345678ab19xy1a 0", 0, 24, 24, "" },
|
||||
/* 3*/ { -1, "012100123412345678AB19XY1A 0901234567890123456789012345678901234567890123456789012345678901", ZINT_ERROR_TOO_LONG, -1, -1, "Error 589: Input too long (90 character maximum)" },
|
||||
/* 4*/ { -1, "012100123412345678AB19XY1A ", ZINT_ERROR_TOO_LONG, -1, -1, "Error 840: Input too short (28 character minimum)" },
|
||||
/* 5*/ { -1, "012100123412345678AB19XY1A 090123456789012345678901234567890123456789012345678901234567", ZINT_ERROR_TOO_LONG, -1, -1, "Error 841: Input too long (86 character maximum)" },
|
||||
/* 6*/ { -1, "JGB 012100123412345678AB19XY1A ", ZINT_ERROR_TOO_LONG, -1, -1, "Error 842: Input too short (32 character minimum)" },
|
||||
/* 7*/ { 9, "JGB 012100123412345678AB19XY1A 0", ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 843: Invalid symbol size selected (8, 10, 30 only)" },
|
||||
/* 4*/ { -1, "012100123412345678AB19XY1A ", ZINT_ERROR_TOO_LONG, -1, -1, "Error 860: Input too short (28 character minimum)" },
|
||||
/* 5*/ { -1, "012100123412345678AB19XY1A 090123456789012345678901234567890123456789012345678901234567", ZINT_ERROR_TOO_LONG, -1, -1, "Error 861: Input too long (86 character maximum)" },
|
||||
/* 6*/ { -1, "JGB 012100123412345678AB19XY1A ", ZINT_ERROR_TOO_LONG, -1, -1, "Error 862: Input too short (32 character minimum)" },
|
||||
/* 7*/ { 9, "JGB 012100123412345678AB19XY1A 0", ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 863: Invalid symbol size selected (8, 10, 30 only)" },
|
||||
/* 8*/ { -1, "JGB 012100123412345678AB19XY1A 0 123456", 0, 24, 24, "" },
|
||||
/* 9*/ { 8, "JGB 012100123412345678AB19XY1A 0 1234567", ZINT_ERROR_TOO_LONG, -1, -1, "Error 844: Input too long for selected size (51 character maximum)" },
|
||||
/* 9*/ { 8, "JGB 012100123412345678AB19XY1A 0 1234567", ZINT_ERROR_TOO_LONG, -1, -1, "Error 864: Input too long for selected size (51 character maximum)" },
|
||||
/* 10*/ { -1, "JGB 012100123412345678AB19XY1A 0 1234567890123456789012345", 0, 16, 48, "" },
|
||||
/* 11*/ { 30, "JGB 012100123412345678AB19XY1A 0 12345678901234567890123456", ZINT_ERROR_TOO_LONG, -1, -1, "Error 845: Input too long for selected size (70 character maximum)" },
|
||||
/* 11*/ { 30, "JGB 012100123412345678AB19XY1A 0 12345678901234567890123456", ZINT_ERROR_TOO_LONG, -1, -1, "Error 865: Input too long for selected size (70 character maximum)" },
|
||||
/* 12*/ { -1, "JGB 012100123412345678AB19XY1A 0 123456789012345678901234567890123456789012345", 0, 32, 32, "" },
|
||||
/* 13*/ { -1, "JGB 012100123412345678AB19XY1A 0 1234567890123456789012345678901234567890123456", ZINT_ERROR_TOO_LONG, -1, -1, "Error 589: Input too long (90 character maximum)" },
|
||||
/* 14*/ { -1, "JGB 012100123412345678AB19XY1A 0 .23456", 0, 24, 24, "" },
|
||||
/* 15*/ { -1, "JGB 012100123412345678AB19XY1A 0 . 23456", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 846: Invalid character in data (alphanumerics and space only in first 45 characters)" },
|
||||
/* 16*/ { -1, "JGB 12100123412345678AB19XY1A 0", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 847: Invalid Information Type ID (cannot be space)" },
|
||||
/* 17*/ { -1, " 12100123412345678AB19XY1A 0", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 847: Invalid Information Type ID (cannot be space)" },
|
||||
/* 18*/ { -1, "JGB 022100123412345678AB19XY1A 0", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 848: Invalid Version ID (\"1\" only)" },
|
||||
/* 19*/ { -1, "JGB 01 100123412345678AB19XY1A 0", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 849: Invalid Class (cannot be space)" },
|
||||
/* 20*/ { -1, "JGB 012100123A12345678AB19XY1A 0", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 850: Invalid Supply Chain ID (7 digits only)" },
|
||||
/* 21*/ { -1, "JGB 01210012341234567AAB19XY1A 0", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 851: Invalid Item ID (8 digits only)" },
|
||||
/* 22*/ { -1, "JGB 012100123412345678AB19VY1A 0", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 852: Invalid Destination Post Code plus DPS" },
|
||||
/* 22*/ { -1, "JGB 012100123412345678AB19XY11 0", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 852: Invalid Destination Post Code plus DPS" },
|
||||
/* 23*/ { -1, "JGB 012100123412345678AB19XY1A 7", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 853: Invalid Service Type (\"0\" to \"6\" only)" },
|
||||
/* 15*/ { -1, "JGB 012100123412345678AB19XY1A 0 . 23456", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 866: Invalid character in data (alphanumerics and space only in first 45 characters)" },
|
||||
/* 16*/ { -1, "JGB 12100123412345678AB19XY1A 0", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 867: Invalid Information Type ID (cannot be space)" },
|
||||
/* 17*/ { -1, " 12100123412345678AB19XY1A 0", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 867: Invalid Information Type ID (cannot be space)" },
|
||||
/* 18*/ { -1, "JGB 022100123412345678AB19XY1A 0", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 868: Invalid Version ID (\"1\" only)" },
|
||||
/* 19*/ { -1, "JGB 01 100123412345678AB19XY1A 0", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 869: Invalid Class (cannot be space)" },
|
||||
/* 20*/ { -1, "JGB 012100123A12345678AB19XY1A 0", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 870: Invalid Supply Chain ID (7 digits only)" },
|
||||
/* 21*/ { -1, "JGB 01210012341234567AAB19XY1A 0", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 871: Invalid Item ID (8 digits only)" },
|
||||
/* 22*/ { -1, "JGB 012100123412345678AB19VY1A 0", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 872: Invalid Destination Post Code plus DPS" },
|
||||
/* 22*/ { -1, "JGB 012100123412345678AB19XY11 0", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 872: Invalid Destination Post Code plus DPS" },
|
||||
/* 23*/ { -1, "JGB 012100123412345678AB19XY1A 7", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 873: Invalid Service Type (\"0\" to \"6\" only)" },
|
||||
/* 24*/ { -1, "JGB 012100123412345678AB19XY1A 0AB18XY", 0, 24, 24, "" },
|
||||
/* 25*/ { -1, "JGB 012100123412345678AB190XY1A0AB18XY", 0, 24, 24, "" },
|
||||
/* 26*/ { -1, "JGB 012100123412345678AB19XY1A 0AB18XI", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 854: Invalid Return to Sender Post Code" },
|
||||
/* 26*/ { -1, "JGB 012100123412345678AB19XY1A 0AB18XI", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 874: Invalid Return to Sender Post Code" },
|
||||
/* 27*/ { -1, "JGB 012100123412345678AB19XY1A 0A18XY", 0, 24, 24, "" },
|
||||
/* 28*/ { -1, "JGB 012100123412345678AB19XY1A 0A18XC", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 854: Invalid Return to Sender Post Code" },
|
||||
/* 28*/ { -1, "JGB 012100123412345678AB19XY1A 0A18XC", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 874: Invalid Return to Sender Post Code" },
|
||||
/* 29*/ { -1, "JGB 012100123412345678AB19XY1A 0AB181XY", 0, 24, 24, "" },
|
||||
/* 30*/ { -1, "JGB 012100123412345678AB19XY1A 0AB181VY", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 854: Invalid Return to Sender Post Code" },
|
||||
/* 30*/ { -1, "JGB 012100123412345678AB19XY1A 0AB181VY", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 874: Invalid Return to Sender Post Code" },
|
||||
/* 31*/ { -1, "JGB 012100123412345678AB19XY1A 0AB181XY ", 0, 24, 24, "" },
|
||||
/* 32*/ { -1, "JGB 012100123412345678AB19XY1A 0AB181XYA ", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 855: Invalid Reserved field (must be spaces only)" },
|
||||
/* 32*/ { -1, "JGB 012100123412345678AB19XY1A 0AB181XYA ", ZINT_ERROR_INVALID_DATA, -1, -1, "Error 875: Invalid Reserved field (must be spaces only)" },
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, ret;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue