pike.git/
src/
testsuite.in
Branch:
Tag:
Non-build tags
All tags
No tags
2001-09-23
2001-09-23 10:34:57 by Mirar (Pontus Hagland) <pike@sort.mirar.org>
8d813e26c1d7ebee3d64b45335bca22d0911d319 (
23
lines) (+
22
/-
1
)
[
Show
|
Annotate
]
Branch:
7.9
added bug
1858 (#1858)
to testsuite
Rev: src/testsuite.in:1.453
1:
-
test_true([["$Id: testsuite.in,v 1.
452
2001/09/23 10:
19
:
33
mirar Exp $"]]);
+
test_true([["$Id: testsuite.in,v 1.
453
2001/09/23 10:
34
:
57
mirar Exp $"]]);
cond([[all_constants()->_verify_internals]], [[
470:
return res; ]],1);
+
test_any( [[
+
// bug [1858] ------------------------------------------------------------
+
// http://community/crunch/show_bug.cgi?id=1858
+
string s=#"
+
constant foo=({this_object()});
+
int|string test()
+
{
+
if (!foo[0]) return sprintf(\"foo is %O\\n\",foo)-\"\\n\";
+
if (foo[0]==this_object()) return 1;
+
return sprintf(\"foo is %O\\n\",foo)-\"\\n\";
+
}
+
";
+
class handler { void compile_error(string file, int line, string err) { }};
+
catch {
+
program p=compile_string(s,"test",handler());
+
return p()->test();
+
};
+
return 1; // compile error is ok
+
]],1);
+
// -----------------------------------------------------------------------