pike.git/
src/
testsuite.in
Branch:
Tag:
Non-build tags
All tags
No tags
2010-02-04
2010-02-04 17:45:00 by Henrik Grubbström (Grubba) <grubba@grubba.org>
f1accd35d434c9d3e613d994f209c5a0159f336f (
19
lines) (+
18
/-
1
)
[
Show
|
Annotate
]
Branch:
7.9
Added test for bad linenumber info from if statements.
Rev: src/testsuite.in:1.889
1:
START_MARKER
-
test_true([["$Id: testsuite.in,v 1.
888
2010/
01
/
21
16
:
14
:
47
grubba Exp $"]]);
+
test_true([["$Id: testsuite.in,v 1.
889
2010/
02
/
04
17
:
45
:
00
grubba Exp $"]]);
// This triggered a bug only if run sufficiently early. test_compile_any([[#pike 7.2]])
2277:
int a() {return y == 3;} ]])
+
dnl This test used to get the last line of the else block
+
test_any([[
+
int expected_line;
+
void foo(object o)
+
{
+
expected_line = __LINE__ + 1;
+
if (o->a && b) {
+
o->a = o->b;
+
} else if (o->b) {
+
o->b = o->a;
+
}
+
};
+
mixed err = catch { foo(UNDEFINED); };
+
return err[1][-1][1] - expected_line;
+
]], 0)
+
dnl ---------------------------------------------------------------- dnl scopes and stuff dnl ----------------------------------------------------------------