pike.git/
src/
testsuite.in
Branch:
Tag:
Non-build tags
All tags
No tags
2001-09-30
2001-09-30 18:56:47 by Mirar (Pontus Hagland) <pike@sort.mirar.org>
c8565d57cd85cdc0a8188699bcb68b483a3e17bd (
21
lines) (+
19
/-
2
)
[
Show
|
Annotate
]
Branch:
7.9
test for the oddities
[]
=({}) and foreach (a;;); added
Rev: src/testsuite.in:1.456
1:
-
test_true([["$Id: testsuite.in,v 1.
455
2001/09/
29
08
:
47
:
03
hubbe
Exp $"]]);
+
test_true([["$Id: testsuite.in,v 1.
456
2001/09/
30
18
:
56:
47
mirar
Exp $"]]);
cond([[all_constants()->_verify_internals]], [[
834:
test_any([[ int a; catch { [a]=({1,2}); }; return 1]],1) test_any([[ int a,b; catch { [a,b]=({1}); }; return 1]],1) test_any([[ mapping m=([]); m[m]=m; return stringp(sprintf("%O",m)); ]],1)
+
test_any([[
+
// don't know if this /should/ be valid /Mirar
+
// remove if it shouldn't
+
array a=({});
+
[]=a; return 1; ]],1)
test_any([[ int q() { throw(1); };
5569:
return ret; ]],24)
+
test_any([[
+
int ret;
+
foreach( (<1,3,7,13>) ; ; ) ret++;
+
return ret;
+
]],4)
-
+
test_any([[ int ret; foreach( (<1,3,7,13>) ; int a; int b) ret+=a+b;
5596:
test_any([[ int ret;
+
foreach( ({2,5,11,17}) ; ; ) ret++;
+
return ret;
+
]],4)
+
+
test_any([[
+
int ret;
foreach( "foobar" ; int a; int b) ret+=a*b; return ret; ]],1585)
5618:
return sizeof(m); ]],0)
-
+
test_any([[ mapping m=([1:2,3:5,7:11,13:17]); int ret;