Fix argcargv.i in Perl5, Tcl, PHP
Add missing type map for type check. Add testing of argcargv.i for Perl5, Tcl, PHP and Ruby. Signed-off-by: Erez Geva <ErezGeva2@gmail.com>
This commit is contained in:
parent
464d548d71
commit
b88fe498ca
7 changed files with 123 additions and 0 deletions
32
Examples/test-suite/ruby/argcargvtest_runme.rb
Normal file
32
Examples/test-suite/ruby/argcargvtest_runme.rb
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
#!/usr/bin/env ruby
|
||||
|
||||
require 'swig_assert'
|
||||
require 'argcargvtest'
|
||||
|
||||
include Argcargvtest
|
||||
|
||||
|
||||
$largs = ["hi", "hola", "hello"]
|
||||
if mainc($largs) != 3
|
||||
raise RuntimeError, "bad main typemap"
|
||||
end
|
||||
|
||||
$targs = ["hi", "hola"]
|
||||
if mainv($targs, 1) != "hola"
|
||||
raise RuntimeError, "bad main typemap"
|
||||
end
|
||||
|
||||
$error = 0
|
||||
$ret = 0
|
||||
begin
|
||||
mainv("hello", 1)
|
||||
$error = 1
|
||||
rescue => e
|
||||
$ret = 1
|
||||
end
|
||||
|
||||
if $error == 1 or $ret != 1
|
||||
raise RuntimeError, "bad main typemap"
|
||||
end
|
||||
|
||||
initializeApp($largs)
|
||||
Loading…
Add table
Add a link
Reference in a new issue