summaryrefslogtreecommitdiff
path: root/Examples/test-suite/python/li_cwstring_runme.py
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2009-08-18 20:56:02 +0000
committerLorry <lorry@roadtrain.codethink.co.uk>2012-09-25 16:59:08 +0000
commit9f8a09ed743cedd9547bf0661d518647966ab114 (patch)
tree9c7803d3b27a8ec22e91792ac7f7932efa128b20 /Examples/test-suite/python/li_cwstring_runme.py
downloadswig-tarball-master.tar.gz
Imported from /srv/lorry/lorry-area/swig-tarball/swig-1.3.40.tar.gz.HEADswig-1.3.40master
Diffstat (limited to 'Examples/test-suite/python/li_cwstring_runme.py')
-rw-r--r--Examples/test-suite/python/li_cwstring_runme.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/Examples/test-suite/python/li_cwstring_runme.py b/Examples/test-suite/python/li_cwstring_runme.py
new file mode 100644
index 0000000..4ab5908
--- /dev/null
+++ b/Examples/test-suite/python/li_cwstring_runme.py
@@ -0,0 +1,29 @@
+from li_cwstring import *
+
+if count(u"ab\0ab\0ab\0", 0) != 3:
+ raise RuntimeError
+
+if test1() != u"Hello World":
+ raise RuntimeError
+
+if test2() != u" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_":
+ raise RuntimeError
+
+if test3("hello") != u"hello-suffix":
+ raise RuntimeError
+
+if test4("hello") != u"hello-suffix":
+ raise RuntimeError
+
+if test5(4) != u'xxxx':
+ raise RuntimeError
+
+if test6(10) != u'xxxxx':
+ raise RuntimeError
+
+if test7() != u"Hello world!":
+ raise RuntimeError
+
+if test8() != u" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_":
+ raise RuntimeError
+