Convert python test scripts to be Python 2 and 3 compatible
Unicode testing
This commit is contained in:
parent
36bb54f01d
commit
66df0bd224
6 changed files with 28 additions and 30 deletions
|
|
@ -1,28 +1,28 @@
|
|||
from li_cwstring import *
|
||||
|
||||
if count(u"ab\0ab\0ab\0", 0) != 3:
|
||||
if count("ab\0ab\0ab\0", 0) != 3:
|
||||
raise RuntimeError
|
||||
|
||||
if test1() != u"Hello World":
|
||||
if test1() != "Hello World":
|
||||
raise RuntimeError
|
||||
|
||||
if test2() != u" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_":
|
||||
if test2() != " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_":
|
||||
raise RuntimeError
|
||||
|
||||
if test3("hello") != u"hello-suffix":
|
||||
if test3("hello") != "hello-suffix":
|
||||
raise RuntimeError
|
||||
|
||||
if test4("hello") != u"hello-suffix":
|
||||
if test4("hello") != "hello-suffix":
|
||||
raise RuntimeError
|
||||
|
||||
if test5(4) != u"xxxx":
|
||||
if test5(4) != "xxxx":
|
||||
raise RuntimeError
|
||||
|
||||
if test6(10) != u"xxxxx":
|
||||
if test6(10) != "xxxxx":
|
||||
raise RuntimeError
|
||||
|
||||
if test7() != u"Hello world!":
|
||||
if test7() != "Hello world!":
|
||||
raise RuntimeError
|
||||
|
||||
if test8() != u" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_":
|
||||
if test8() != " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_":
|
||||
raise RuntimeError
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue