mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
Move mjsunit.js to system module directory.
This commit is contained in:
13
test/mjsunit/common.js
Normal file
13
test/mjsunit/common.js
Normal file
@@ -0,0 +1,13 @@
|
||||
exports.testDir = node.path.dirname(__filename);
|
||||
exports.fixturesDir = node.path.join(exports.testDir, "fixtures");
|
||||
exports.libDir = node.path.join(exports.testDir, "../../lib");
|
||||
|
||||
node.libraryPaths.unshift(exports.libDir);
|
||||
|
||||
var mjsunit = require("/mjsunit.js");
|
||||
// Copy mjsunit namespace out
|
||||
for (var prop in mjsunit) {
|
||||
if (mjsunit.hasOwnProperty(prop)) exports[prop] = mjsunit[prop];
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include("mjsunit.js");
|
||||
include("common.js");
|
||||
|
||||
var a = [116,101,115,116,32,206,163,207,131,207,128,206,177,32,226,161,140,226,160, 129,226,160,167,226,160,145];
|
||||
var s = node.encodeUtf8(a);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include("mjsunit.js");
|
||||
include("common.js");
|
||||
|
||||
var e = new node.EventEmitter();
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include("mjsunit.js");
|
||||
include("common.js");
|
||||
|
||||
success_count = 0;
|
||||
error_count = 0;
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
include("mjsunit.js");
|
||||
include("common.js");
|
||||
var got_error = false;
|
||||
|
||||
var dirname = node.path.dirname(__filename);
|
||||
var fixtures = node.path.join(dirname, "fixtures");
|
||||
var filename = node.path.join(fixtures, "does_not_exist.txt");
|
||||
var filename = node.path.join(fixturesDir, "does_not_exist.txt");
|
||||
var promise = node.fs.cat(filename, "raw");
|
||||
|
||||
promise.addCallback(function (content) {
|
||||
@@ -17,5 +15,6 @@ promise.addErrback(function () {
|
||||
});
|
||||
|
||||
process.addListener("exit", function () {
|
||||
puts("done");
|
||||
assertTrue(got_error);
|
||||
});
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include("mjsunit.js");
|
||||
include("common.js");
|
||||
|
||||
var got_error = false;
|
||||
var success_count = 0;
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
include("mjsunit.js");
|
||||
include("common.js");
|
||||
|
||||
var dirname = node.path.dirname(__filename);
|
||||
var fixtures = node.path.join(dirname, "fixtures");
|
||||
var path = node.path.join(fixtures, "write.txt");
|
||||
var path = node.path.join(fixturesDir, "write.txt");
|
||||
var expected = "hello";
|
||||
var found;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include("mjsunit.js");
|
||||
include("common.js");
|
||||
PORT = 8888;
|
||||
|
||||
var body = "exports.A = function() { return 'A';}";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include("mjsunit.js");
|
||||
include("common.js");
|
||||
PORT = 8888;
|
||||
|
||||
var body1_s = "1111111111111111";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include("mjsunit.js");
|
||||
include("common.js");
|
||||
var PORT = 18032;
|
||||
|
||||
var sent_body = "";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include("mjsunit.js");
|
||||
include("common.js");
|
||||
|
||||
// Make sure no exceptions are thrown when receiving malformed HTTP
|
||||
// requests.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include("mjsunit.js");
|
||||
include("common.js");
|
||||
|
||||
var PROXY_PORT = 8869;
|
||||
var BACKEND_PORT = 8870;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include("mjsunit.js");
|
||||
include("common.js");
|
||||
|
||||
var port = 8222;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include("mjsunit.js");
|
||||
include("common.js");
|
||||
PORT = 8888;
|
||||
|
||||
var responses_sent = 0;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include("mjsunit.js");
|
||||
include("common.js");
|
||||
|
||||
var dirname = node.path.dirname(__filename);
|
||||
var fixtures = node.path.join(dirname, "fixtures");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
node.debug("load test-module-loading.js");
|
||||
include("mjsunit.js");
|
||||
include("common.js");
|
||||
var a = require("fixtures/a.js");
|
||||
var d = require("fixtures/b/d.js");
|
||||
var d2 = require("fixtures/b/d.js");
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include("mjsunit.js");
|
||||
include("common.js");
|
||||
PORT = 8888;
|
||||
|
||||
puts("hello world");
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include("mjsunit.js");
|
||||
include("common.js");
|
||||
|
||||
var pwd_called = false;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include("mjsunit.js");
|
||||
include("common.js");
|
||||
|
||||
var exit_status = -1;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include("mjsunit.js");
|
||||
include("common.js");
|
||||
|
||||
var cat = node.createChildProcess("cat");
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include("mjsunit.js");
|
||||
include("common.js");
|
||||
|
||||
var N = 40;
|
||||
var finished = false;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include("mjsunit.js");
|
||||
include("common.js");
|
||||
|
||||
var p1_done = false;
|
||||
var p1 = new node.Promise();
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
|
||||
include("mjsunit.js");
|
||||
|
||||
var dirname = node.path.dirname(__filename);
|
||||
var fixtures = node.path.join(dirname, "fixtures");
|
||||
include("common.js");
|
||||
|
||||
var got_error = false;
|
||||
|
||||
var promise = node.fs.readdir(fixtures);
|
||||
puts("readdir " + fixtures);
|
||||
var promise = node.fs.readdir(fixturesDir);
|
||||
puts("readdir " + fixturesDir);
|
||||
|
||||
promise.addCallback(function (files) {
|
||||
p(files);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include("mjsunit.js");
|
||||
include("common.js");
|
||||
// settings
|
||||
var port = 20743;
|
||||
var bytes = 1024*40;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include("mjsunit.js");
|
||||
include("common.js");
|
||||
|
||||
|
||||
var tests_run = 0;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include("mjsunit.js");
|
||||
include("common.js");
|
||||
|
||||
|
||||
var tests_run = 0;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include("mjsunit.js");
|
||||
include("common.js");
|
||||
PORT = 23123;
|
||||
|
||||
var echoServer = node.tcp.createServer(function (connection) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include("mjsunit.js");
|
||||
include("common.js");
|
||||
PORT = 23123;
|
||||
|
||||
binaryString = "";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include("mjsunit.js");
|
||||
include("common.js");
|
||||
var N = 50;
|
||||
var port = 8921;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include("mjsunit.js");
|
||||
include("common.js");
|
||||
PORT = 20444;
|
||||
N = 30*1024; // 500kb
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include("mjsunit.js");
|
||||
include("common.js");
|
||||
PORT = 20443;
|
||||
N = 200;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include("mjsunit.js");
|
||||
include("common.js");
|
||||
port = 9992;
|
||||
exchanges = 0;
|
||||
starttime = null;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include("mjsunit.js");
|
||||
include("common.js");
|
||||
|
||||
var WINDOW = 800; // why is does this need to be so big?
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include("mjsunit.js");
|
||||
include("common.js");
|
||||
|
||||
// üäö
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
include("mjsunit.js");
|
||||
include("common.js");
|
||||
|
||||
function timer (t) {
|
||||
var promise = new node.Promise();
|
||||
|
||||
Reference in New Issue
Block a user