From 6ac34c924fc463880953a62eaa020916fd277e60 Mon Sep 17 00:00:00 2001 From: "mhammond%skippinet.com.au" Date: Fri, 8 Aug 2003 00:50:34 +0000 Subject: [PATCH] Add some extra utf8 string tests. --- .../python/xpcom/test/test_test_component.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/extensions/python/xpcom/test/test_test_component.js b/extensions/python/xpcom/test/test_test_component.js index 3018f90a457..132cc96505f 100644 --- a/extensions/python/xpcom/test/test_test_component.js +++ b/extensions/python/xpcom/test/test_test_component.js @@ -19,6 +19,8 @@ /* Javascript code calling the Python test interface. */ +var extended_unicode_string = "The Euro Symbol is '\u20ac'"; + function MakeTestInterface() { var clazz = Components.classes["Python.TestComponent"]; @@ -60,12 +62,27 @@ if (c.wstring_value != 'dee') c.wstring_value = 'eee'; if (c.wstring_value != 'eee') throw("wstring_value has wrong new value"); +c.wstring_value = extended_unicode_string; +if (c.wstring_value != extended_unicode_string) + throw("wstring_value has wrong new value"); if (c.domstring_value != 'dom') throw("domstring_value has wrong initial value"); c.domstring_value = 'New value'; if (c.domstring_value != 'New value') throw("domstring_value has wrong new value"); +c.domstring_value = extended_unicode_string; +if (c.domstring_value != extended_unicode_string) + throw("domstring_value has wrong new value"); + +if (c.utf8string_value != 'utf8string') + throw("utf8string_value has wrong initial value"); +c.utf8string_value = 'New value'; +if (c.utf8string_value != 'New value') + throw("utf8string_value has wrong new value"); +c.utf8string_value = extended_unicode_string; +if (c.utf8string_value != extended_unicode_string) + throw("utf8string_value has wrong new value"); var v = new Object(); v.value = "Hello"