PageRenderTime 55ms CodeModel.GetById 41ms app.highlight 10ms RepoModel.GetById 2ms app.codeStats 0ms

/trunk/Examples/test-suite/ruby/li_cstring_runme.rb

#
Ruby | 22 lines | 14 code | 4 blank | 4 comment | 8 complexity | ebbfeeb172188e49003b659d6d27b1f7 MD5 | raw file
 1#!/usr/bin/env ruby
 2#
 3# Test for li_cstring.i
 4#
 5
 6require 'swig_assert'
 7require 'li_cstring'
 8
 9include Li_cstring
10
11swig_assert_each_line <<EOF
12count("hello", 'l'[0]) == 2
13test1 == 'Hello World'
14test2
15test3('hello') == 'hello-suffix'
16test4('hello') == 'hello-suffix'
17test5(5) == 'xxxxx'
18test6(6) == 'xxx'
19test7    == 'Hello world!'
20test8    == (32..32+63).map {|x| x.chr }.join
21EOF
22