repo.or.cz
/
phplua.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Bump version
[phplua.git]
/
tests
/
001.phpt
blob
f47dc467fb2d08cad3f9472c3fa49851d9dcfe9f
1
--TEST--
2
Basic lua check
3
--SKIPIF--
4
<?php if (!extension_loaded("lua")) print "skip"; ?>
5
--FILE--
6
<?php
7
$l = new lua();
8
$l->b = 12;
9
$l->evaluate("print(b)");
10
$l->evaluate('print("\n")');
11
$l->evaluate("print(math.sin(b))");
12
$l->evaluate("invalid code");
13
--EXPECTF--
14
12
15
-0.53657291800043
16
Warning: lua::evaluate(): lua error: %s in %s on line %i