diff options
Diffstat (limited to '')
-rw-r--r-- | comm/mailnews/intl/test/unit/test_decode_utf-7.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/comm/mailnews/intl/test/unit/test_decode_utf-7.js b/comm/mailnews/intl/test/unit/test_decode_utf-7.js new file mode 100644 index 0000000000..e81dd137e6 --- /dev/null +++ b/comm/mailnews/intl/test/unit/test_decode_utf-7.js @@ -0,0 +1,23 @@ +// Tests conversion from UTF-7 to Unicode. The conversion should fail! + +var inString = + "+LGI--+ITIipSIp- +AocCeQ-oddns +Ad0CjQ- s+ATECZQKH- p+AlAB3QJ5- u+AlACVA- no+Ao4- +Al8-I"; + +var expectedString = + "+LGI--+ITIipSIp- +AocCeQ-oddns +Ad0CjQ- s+ATECZQKH- p+AlAB3QJ5- u+AlACVA- no+Ao4- +Al8-I"; + +var aliases = [ + "UTF-7", + "utf-7", + "x-unicode-2-0-utf-7", + "unicode-2-0-utf-7", + "unicode-1-1-utf-7", + "csunicode11utf7", +]; + +function run_test() { + let converter = CreateScriptableConverter(); + for (let i = 0; i < aliases.length; ++i) { + checkDecode(converter, aliases[i], inString, expectedString); + } +} |