From cfea05a7351b8320fc209f888a4970a9d69f26da Mon Sep 17 00:00:00 2001 From: George Rhoten Date: Fri, 21 Mar 2003 19:00:48 +0000 Subject: [PATCH] ICU-1977 Add a couple of tests for ambiguous CCSIDs X-SVN-Rev: 11382 --- icu4c/source/test/cintltst/stdnmtst.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/icu4c/source/test/cintltst/stdnmtst.c b/icu4c/source/test/cintltst/stdnmtst.c index a8d85a1e6b3..00ea9f6032b 100644 --- a/icu4c/source/test/cintltst/stdnmtst.c +++ b/icu4c/source/test/cintltst/stdnmtst.c @@ -124,7 +124,7 @@ static int dotestconv(const char *name, const char *standard, const char *expect } else if (!tag && expected) { log_err("FAIL: could not find %s canonical name for %s\n", (standard ? "\"\"" : standard), name); res = 0; - } else if (expected && (name == tag || uprv_strcmp(expected, tag))) { + } else if (expected && (name == tag || uprv_strcmp(expected, tag)) && error == U_ZERO_ERROR) { log_err("FAIL: expected %s for %s canonical name for %s, got %s\n", expected, standard, name, tag); res = 0; } @@ -149,6 +149,10 @@ static void TestCanonicalName() dotestconv("ISO-2022", "MIME", "ISO_2022") &&/* default name */ dotestconv("Shift_JIS", "MIME", "ibm-943_P14A-2000") &&/* ambiguous alias */ dotestconv("Shift_JIS", "", "ibm-943_P130-2000") &&/* ambiguous alias */ + dotestconv("ibm-943", "", "ibm-943_P14A-2000") &&/* ambiguous alias */ + dotestconv("ibm-943", "IBM", "ibm-943_P130-2000") &&/* ambiguous alias */ + dotestconv("ibm-1363", "", "ibm-1363_P11B-2000") &&/* ambiguous alias */ + dotestconv("ibm-1363", "IBM", "ibm-1363_P110-2000") &&/* ambiguous alias */ dotestconv("crazy", "MIME", NULL) && dotestconv("ASCII", "crazy", NULL)) {