pike.git/
src/
testsuite.in
Branch:
Tag:
Non-build tags
All tags
No tags
1997-04-22
1997-04-22 00:10:16 by Henrik Grubbström (Grubba) <grubba@grubba.org>
2ae467b7f3558a440f4c5fd0cef32d4a9acb07c7 (
8
lines) (+
7
/-
1
)
[
Show
|
Annotate
]
Branch:
7.9
Added some tests for the LR-module
Rev: src/testsuite.in:1.38
1:
-
test_true([["$Id: testsuite.in,v 1.
37
1997/
03
/
17
22:
52
:
02
hubbe
Exp $"]])
+
test_true([["$Id: testsuite.in,v 1.
38
1997/
04
/
22
00
:
10
:
16
grubba
Exp $"]])
test_any([[class foo { constant x=17; }; class bar { inherit foo; constant x=18; }; return bar()->x;]],18) test_program([[inline string foo(string s){ while(s[0] == ' ' || s[0] == '\t') s = s[1..]; return(s); } string a() { return foo(" bar"); }]]) test_true([[lambda(function f) {return 1;}(object_program(this_object()));]])
1721:
test_eval_error(clone(class{int i;void foo(){ destruct(this_object());i=0;}})->foo())
+
// Pike modules
+
// LR
+
test_true(LR.parser)
+
test_true(LR.Grammar_parser)
+
test_program([[ object(LR.parser) p=LR.Grammar_parser.make_parser("foo : bar;foo : foo bar;bar : \"a\";"); int pos; array(string) data="aaaaaaaaa"/""; string scan() { if (pos < sizeof(data)) return(data[pos++]); else return ""; } int a() { return(p->parse(scan) == "a"); }]])