mirror of
https://github.com/php-win-ext/php-lua.git
synced 2026-03-24 00:52:12 +01:00
Added tests for bug #71997
This commit is contained in:
22
tests/bug71997.phpt
Normal file
22
tests/bug71997.phpt
Normal file
@@ -0,0 +1,22 @@
|
||||
--TEST--
|
||||
Bug #71997 (One-Dimensional arrays cause segmentation faults)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("lua")) print "skip lua extension missing";
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$mylua = new \lua();
|
||||
$mylua->eval(<<<CODE
|
||||
function nicefunction(args)
|
||||
print(args[1])
|
||||
return args[1]
|
||||
end
|
||||
CODE
|
||||
);
|
||||
|
||||
echo $mylua->call("nicefunction", array(array('hello', 'world')));
|
||||
?>
|
||||
done
|
||||
--EXPECT--
|
||||
worldworlddone
|
||||
Reference in New Issue
Block a user