mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-29 14:25:23 -04:00
UPU_S10: fix Service Indicator warning re "H" (ticket #331, props
Milton Neal), which is valid; quote invalid Service Indicator, Country Code in warnings
This commit is contained in:
parent
e12c5ed3ba
commit
de8a62ca2a
3 changed files with 25 additions and 13 deletions
|
@ -1132,11 +1132,21 @@ static void test_upu_s10_input(const testCtx *const p_ctx) {
|
|||
/* 12*/ { "AB123456789A2", ZINT_ERROR_INVALID_DATA, 0, "Error 837: Invalid character in Country Code (last 2 characters) (alphabetic only)", "" },
|
||||
/* 13*/ { "AB12345678A2", ZINT_ERROR_INVALID_DATA, 0, "Error 837: Invalid character in Country Code (last 2 characters) (alphabetic only)", "" },
|
||||
/* 14*/ { "AB123456789AB", ZINT_ERROR_INVALID_CHECK, 0, "Error 838: Invalid check digit '9', expecting '5'", "" },
|
||||
/* 15*/ { "JB123456785AB", ZINT_WARN_NONCOMPLIANT, 156, "Warning 839: Invalid Service Indicator (first character should not be any of \"JKSTW\")", "" },
|
||||
/* 16*/ { "FB123456785AB", ZINT_WARN_NONCOMPLIANT, 156, "Warning 840: Non-standard Service Indicator (first 2 characters)", "" },
|
||||
/* 17*/ { "AB123456785AB", ZINT_WARN_NONCOMPLIANT, 156, "Warning 841: Country code (last two characters) is not ISO 3166-1", "" },
|
||||
/* 18*/ { "AB123100000IE", 0, 156, "", "Check digit 10 -> 0" },
|
||||
/* 19*/ { "AB000000005IE", 0, 156, "", "Check digit 11 -> 5" },
|
||||
/* 15*/ { "JB123456785AB", ZINT_WARN_NONCOMPLIANT, 156, "Warning 839: Invalid Service Indicator 'JB' (first character should not be any of \"JKSTW\")", "" },
|
||||
/* 16*/ { "KB123456785AB", ZINT_WARN_NONCOMPLIANT, 156, "Warning 839: Invalid Service Indicator 'KB' (first character should not be any of \"JKSTW\")", "" },
|
||||
/* 17*/ { "LB123456785AD", 0, 156, "", "" },
|
||||
/* 18*/ { "SB123456785AB", ZINT_WARN_NONCOMPLIANT, 156, "Warning 839: Invalid Service Indicator 'SB' (first character should not be any of \"JKSTW\")", "" },
|
||||
/* 19*/ { "TB123456785AB", ZINT_WARN_NONCOMPLIANT, 156, "Warning 839: Invalid Service Indicator 'TB' (first character should not be any of \"JKSTW\")", "" },
|
||||
/* 20*/ { "WB123456785AB", ZINT_WARN_NONCOMPLIANT, 156, "Warning 839: Invalid Service Indicator 'WB' (first character should not be any of \"JKSTW\")", "" },
|
||||
/* 21*/ { "FB123456785AB", ZINT_WARN_NONCOMPLIANT, 156, "Warning 840: Non-standard Service Indicator 'FB' (first 2 characters)", "" },
|
||||
/* 22*/ { "HB123456785AD", 0, 156, "", "" },
|
||||
/* 23*/ { "IB123456785AB", ZINT_WARN_NONCOMPLIANT, 156, "Warning 840: Non-standard Service Indicator 'IB' (first 2 characters)", "" },
|
||||
/* 24*/ { "OB123456785AB", ZINT_WARN_NONCOMPLIANT, 156, "Warning 840: Non-standard Service Indicator 'OB' (first 2 characters)", "" },
|
||||
/* 25*/ { "XB123456785AB", ZINT_WARN_NONCOMPLIANT, 156, "Warning 840: Non-standard Service Indicator 'XB' (first 2 characters)", "" },
|
||||
/* 26*/ { "YB123456785AB", ZINT_WARN_NONCOMPLIANT, 156, "Warning 840: Non-standard Service Indicator 'YB' (first 2 characters)", "" },
|
||||
/* 27*/ { "AB123456785AB", ZINT_WARN_NONCOMPLIANT, 156, "Warning 841: Country Code 'AB' (last two characters) is not ISO 3166-1", "" },
|
||||
/* 28*/ { "AB123100000IE", 0, 156, "", "Check digit 10 -> 0" },
|
||||
/* 29*/ { "AB000000005IE", 0, 156, "", "Check digit 11 -> 5" },
|
||||
};
|
||||
const int data_size = ARRAY_SIZE(data);
|
||||
int i, length, ret;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue