Upstream version 1.3.40
[profile/ivi/swig.git] / Examples / test-suite / ruby / li_cstring_runme.rb
1 #!/usr/bin/env ruby
2 #
3 # Test for li_cstring.i
4 #
5
6 require 'swig_assert'
7 require 'li_cstring'
8
9 include Li_cstring
10
11 swig_assert_each_line <<EOF
12 count("hello", 'l'[0]) == 2
13 test1 == 'Hello World'
14 test2
15 test3('hello') == 'hello-suffix'
16 test4('hello') == 'hello-suffix'
17 test5(5) == 'xxxxx'
18 test6(6) == 'xxx'
19 test7    == 'Hello world!'
20 test8    == (32..32+63).map {|x| x.chr }.join
21 EOF
22