pike.git/
src/
testsuite.in
Branch:
Tag:
Non-build tags
All tags
No tags
2002-12-03
2002-12-03 17:57:45 by Marcus Comstedt <marcus@mc.pp.se>
8eef44c1631ebbc5f25eaf578797b3516c5945fe (
19
lines) (+
12
/-
7
)
[
Show
|
Annotate
]
Branch:
7.9
Test that compat modules can be loaded as well.
Rev: src/testsuite.in:1.575
1:
-
test_true([["$Id: testsuite.in,v 1.
574
2002/12/
01
01
:
33
:
31
nilsson
Exp $"]]);
+
test_true([["$Id: testsuite.in,v 1.
575
2002/12/
03
17
:
57
:
45
marcus
Exp $"]]);
// This triggered a bug only if run sufficiently early. test_compile_any([[#pike 7.2]])
9288:
test_program([[ int ok=1;
-
void test_resolv(string file, int base_size)
+
void test_resolv(string file, int base_size
, object|void handler
)
{ __signal_watchdog(); string prg = replace( file[base_size+1..sizeof(file)-6],
9296:
if(prg[sizeof(prg)-7..]==".module") prg = prg[..sizeof(prg)-8]; // werror("Resolving %O...\n", prg);
-
if( catch( master()->resolv(prg) ) ) {
+
if( catch(
(handler||
master()
)
->resolv(prg) ) ) {
werror("test: failed to peek at %O\n", prg); ok=0; } }
-
void test_dir(string dir, int|void base_size)
+
void test_dir(string dir, int|void base_size
, object|void handler
)
{ // werror("Testing directory %O...\n", dir); if(!base_size) base_size=sizeof(dir);
9332:
if(!stat) continue; if(stat[1]==-2 && has_suffix(file, ".pmod")) {
-
test_resolv(file, base_size);
-
test_dir(file, base_size);
+
test_resolv(file, base_size
, handler
);
+
test_dir(file, base_size
, handler
);
} else if(stat[1]>=0){ // werror("Testing file %O\n", file);
9348:
continue; } #endif
-
test_resolv(file, base_size);
+
test_resolv(file, base_size
, handler
);
} } }
9356:
int a() { Array.map(master()->pike_module_path,test_dir);
+
foreach(({"0.6","7.0","7.2"}),string ver) {
+
object handler = master()->get_compilation_handler(@(array(int))(ver/"."));
+
Array.map(handler->pike_module_path,test_dir,0,handler);
+
}
return ok; } ]])