Revision: 5352d51c17a1
Branch:   default
Author:   Pekka Klärck
Date:     Wed Sep 18 09:01:36 2013 UTC
Log:      fixed tests for \U escape on narrow builds
http://code.google.com/p/robotframework/source/detail?r=5352d51c17a1

Modified:
 /atest/testdata/parsing/escaping_variables.py
 /utest/utils/test_escaping.py

=======================================
--- /atest/testdata/parsing/escaping_variables.py Wed Sep 18 07:46:39 2013 UTC +++ /atest/testdata/parsing/escaping_variables.py Wed Sep 18 09:01:36 2013 UTC
@@ -10,7 +10,10 @@
 xFF = u'\xFF'
 u2603 = u'\u2603'  # SNOWMAN
 uFFFF = u'\uFFFF'
-U00010905 = u'\U00010905'  # PHOENICIAN LETTER WAU
+try:
+    U00010905 = unichr(int('00010905', 16))  # PHOENICIAN LETTER WAU
+except ValueError:  # occurs on "narrow" Python builds
+    U00010905 = 'U00010905'
 bs = '\\'
 var = '${non_existing}'
 pipe = '|'
=======================================
--- /utest/utils/test_escaping.py       Wed Sep 18 07:45:56 2013 UTC
+++ /utest/utils/test_escaping.py       Wed Sep 18 09:01:36 2013 UTC
@@ -104,9 +104,13 @@
             assert_unescape(inp, inp.replace('\\', ''))

     def test_valid_U(self):
+        try:
+ u00010905 = unichr(int('00010905', 16)) # PHOENICIAN LETTER WAU
+        except ValueError:  # occurs on "narrow" Python builds
+            u00010905 = 'U00010905'
         for inp, exp in [(r'\U00000000', u'\x00'),
                          (r'\U0000ABba', u'\uabba'),
-                         (r'\U00010905', u'\U00010905'),
+                         (r'\U00010905', u00010905),
                          (r'\U000000e4iti', u'\xe4iti')]:
             assert_unescape(inp, exp)

--

--- You received this message because you are subscribed to the Google Groups "robotframework-commit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to robotframework-commit+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to