Added tests for bug #71997

This commit is contained in:
Xinchen Hui
2016-04-11 10:51:15 +08:00
parent c7d9844cf1
commit f177b21ff1

22
tests/bug71997.phpt Normal file
View 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