2009-09-18 15:45:47 +02:00
|
|
|
node.debug("load test-module-loading.js");
|
2009-09-20 18:19:33 +02:00
|
|
|
include("common.js");
|
2009-06-08 15:30:10 +02:00
|
|
|
var a = require("fixtures/a.js");
|
|
|
|
var d = require("fixtures/b/d.js");
|
|
|
|
var d2 = require("fixtures/b/d.js");
|
|
|
|
|
2009-08-26 18:22:00 +02:00
|
|
|
assertFalse(false, "testing the test program.");
|
2009-06-08 15:30:10 +02:00
|
|
|
|
2009-08-26 18:22:00 +02:00
|
|
|
assertInstanceof(a.A, Function);
|
|
|
|
assertEquals("A", a.A());
|
2009-06-08 15:30:10 +02:00
|
|
|
|
2009-08-26 18:22:00 +02:00
|
|
|
assertInstanceof(a.C, Function);
|
|
|
|
assertEquals("C", a.C());
|
2009-06-08 15:30:10 +02:00
|
|
|
|
2009-08-26 18:22:00 +02:00
|
|
|
assertInstanceof(a.D, Function);
|
|
|
|
assertEquals("D", a.D());
|
2009-06-08 15:30:10 +02:00
|
|
|
|
2009-08-26 18:22:00 +02:00
|
|
|
assertInstanceof(d.D, Function);
|
|
|
|
assertEquals("D", d.D());
|
2009-06-08 15:30:10 +02:00
|
|
|
|
2009-08-26 18:22:00 +02:00
|
|
|
assertInstanceof(d2.D, Function);
|
|
|
|
assertEquals("D", d2.D());
|
2009-06-08 16:17:33 +02:00
|
|
|
|
2009-08-26 18:51:04 +02:00
|
|
|
process.addListener("exit", function () {
|
2009-06-08 16:17:33 +02:00
|
|
|
assertInstanceof(a.A, Function);
|
|
|
|
assertEquals("A done", a.A());
|
|
|
|
|
|
|
|
assertInstanceof(a.C, Function);
|
|
|
|
assertEquals("C done", a.C());
|
|
|
|
|
|
|
|
assertInstanceof(a.D, Function);
|
|
|
|
assertEquals("D done", a.D());
|
|
|
|
|
|
|
|
assertInstanceof(d.D, Function);
|
|
|
|
assertEquals("D done", d.D());
|
|
|
|
|
|
|
|
assertInstanceof(d2.D, Function);
|
|
|
|
assertEquals("D done", d2.D());
|
2009-09-18 15:45:47 +02:00
|
|
|
|
|
|
|
puts("exit");
|
2009-08-26 18:51:04 +02:00
|
|
|
});
|