File: loadString.phpt

package info (click to toggle)
php-luasandbox 4.1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 620 kB
  • sloc: ansic: 3,700; xml: 2,152; php: 64; makefile: 13; sh: 3
file content (18 lines) | stat: -rw-r--r-- 334 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--TEST--
loadString 1
--FILE--
<?php
var_dump($sandbox = new LuaSandbox);
var_dump($f = $sandbox->loadString('foo()'));
try {
	$f = $sandbox->loadString('foo');
} catch( Exception $e ) {
	print $e->getMessage();
}

--EXPECTF--
object(LuaSandbox)#1 (0) {
}
object(LuaSandboxFunction)#2 (0) {
}
[string ""]:1: '=' expected near '<eof>'