Browse Source

Move mjsunit.js to system module directory.

v0.7.4-release
Ryan Dahl 15 years ago
parent
commit
4b8f503fac
  1. 0
      lib/mjsunit.js
  2. 13
      test/mjsunit/common.js
  3. 2
      test/mjsunit/test-encode-utf8.js
  4. 2
      test/mjsunit/test-event-emitter-add-listeners.js
  5. 2
      test/mjsunit/test-exec.js
  6. 7
      test/mjsunit/test-file-cat-noexist.js
  7. 2
      test/mjsunit/test-fs-stat.js
  8. 6
      test/mjsunit/test-fs-write.js
  9. 2
      test/mjsunit/test-http-cat.js
  10. 2
      test/mjsunit/test-http-client-race.js
  11. 2
      test/mjsunit/test-http-client-upload.js
  12. 2
      test/mjsunit/test-http-malformed-request.js
  13. 2
      test/mjsunit/test-http-proxy.js
  14. 2
      test/mjsunit/test-http-server.js
  15. 2
      test/mjsunit/test-http.js
  16. 2
      test/mjsunit/test-mkdir-rmdir.js
  17. 2
      test/mjsunit/test-module-loading.js
  18. 2
      test/mjsunit/test-node-cat.js
  19. 2
      test/mjsunit/test-process-buffering.js
  20. 2
      test/mjsunit/test-process-kill.js
  21. 2
      test/mjsunit/test-process-simple.js
  22. 2
      test/mjsunit/test-process-spawn-loop.js
  23. 2
      test/mjsunit/test-promise-wait.js
  24. 10
      test/mjsunit/test-readdir.js
  25. 2
      test/mjsunit/test-tcp-many-clients.js
  26. 2
      test/mjsunit/test-tcp-pingpong-delay.js
  27. 2
      test/mjsunit/test-tcp-pingpong.js
  28. 2
      test/mjsunit/test-tcp-raw.js
  29. 2
      test/mjsunit/test-tcp-raws.js
  30. 2
      test/mjsunit/test-tcp-reconnect.js
  31. 2
      test/mjsunit/test-tcp-throttle-kernel-buffer.js
  32. 2
      test/mjsunit/test-tcp-throttle.js
  33. 2
      test/mjsunit/test-tcp-timeout.js
  34. 2
      test/mjsunit/test-timers.js
  35. 2
      test/mjsunit/test-utf8-scripts.js
  36. 2
      test/mjsunit/test-wait-ordering.js
  37. 1
      wscript

0
test/mjsunit/mjsunit.js → lib/mjsunit.js

13
test/mjsunit/common.js

@ -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];
}

2
test/mjsunit/test-encode-utf8.js

@ -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);

2
test/mjsunit/test-event-emitter-add-listeners.js

@ -1,4 +1,4 @@
include("mjsunit.js");
include("common.js");
var e = new node.EventEmitter();

2
test/mjsunit/test-exec.js

@ -1,4 +1,4 @@
include("mjsunit.js");
include("common.js");
success_count = 0;
error_count = 0;

7
test/mjsunit/test-file-cat-noexist.js

@ -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);
});

2
test/mjsunit/test-fs-stat.js

@ -1,4 +1,4 @@
include("mjsunit.js");
include("common.js");
var got_error = false;
var success_count = 0;

6
test/mjsunit/test-fs-write.js

@ -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;

2
test/mjsunit/test-http-cat.js

@ -1,4 +1,4 @@
include("mjsunit.js");
include("common.js");
PORT = 8888;
var body = "exports.A = function() { return 'A';}";

2
test/mjsunit/test-http-client-race.js

@ -1,4 +1,4 @@
include("mjsunit.js");
include("common.js");
PORT = 8888;
var body1_s = "1111111111111111";

2
test/mjsunit/test-http-client-upload.js

@ -1,4 +1,4 @@
include("mjsunit.js");
include("common.js");
var PORT = 18032;
var sent_body = "";

2
test/mjsunit/test-http-malformed-request.js

@ -1,4 +1,4 @@
include("mjsunit.js");
include("common.js");
// Make sure no exceptions are thrown when receiving malformed HTTP
// requests.

2
test/mjsunit/test-http-proxy.js

@ -1,4 +1,4 @@
include("mjsunit.js");
include("common.js");
var PROXY_PORT = 8869;
var BACKEND_PORT = 8870;

2
test/mjsunit/test-http-server.js

@ -1,4 +1,4 @@
include("mjsunit.js");
include("common.js");
var port = 8222;

2
test/mjsunit/test-http.js

@ -1,4 +1,4 @@
include("mjsunit.js");
include("common.js");
PORT = 8888;
var responses_sent = 0;

2
test/mjsunit/test-mkdir-rmdir.js

@ -1,4 +1,4 @@
include("mjsunit.js");
include("common.js");
var dirname = node.path.dirname(__filename);
var fixtures = node.path.join(dirname, "fixtures");

2
test/mjsunit/test-module-loading.js

@ -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");

2
test/mjsunit/test-node-cat.js

@ -1,4 +1,4 @@
include("mjsunit.js");
include("common.js");
PORT = 8888;
puts("hello world");

2
test/mjsunit/test-process-buffering.js

@ -1,4 +1,4 @@
include("mjsunit.js");
include("common.js");
var pwd_called = false;

2
test/mjsunit/test-process-kill.js

@ -1,4 +1,4 @@
include("mjsunit.js");
include("common.js");
var exit_status = -1;

2
test/mjsunit/test-process-simple.js

@ -1,4 +1,4 @@
include("mjsunit.js");
include("common.js");
var cat = node.createChildProcess("cat");

2
test/mjsunit/test-process-spawn-loop.js

@ -1,4 +1,4 @@
include("mjsunit.js");
include("common.js");
var N = 40;
var finished = false;

2
test/mjsunit/test-promise-wait.js

@ -1,4 +1,4 @@
include("mjsunit.js");
include("common.js");
var p1_done = false;
var p1 = new node.Promise();

10
test/mjsunit/test-readdir.js

@ -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);

2
test/mjsunit/test-tcp-many-clients.js

@ -1,4 +1,4 @@
include("mjsunit.js");
include("common.js");
// settings
var port = 20743;
var bytes = 1024*40;

2
test/mjsunit/test-tcp-pingpong-delay.js

@ -1,4 +1,4 @@
include("mjsunit.js");
include("common.js");
var tests_run = 0;

2
test/mjsunit/test-tcp-pingpong.js

@ -1,4 +1,4 @@
include("mjsunit.js");
include("common.js");
var tests_run = 0;

2
test/mjsunit/test-tcp-raw.js

@ -1,4 +1,4 @@
include("mjsunit.js");
include("common.js");
PORT = 23123;
var echoServer = node.tcp.createServer(function (connection) {

2
test/mjsunit/test-tcp-raws.js

@ -1,4 +1,4 @@
include("mjsunit.js");
include("common.js");
PORT = 23123;
binaryString = "";

2
test/mjsunit/test-tcp-reconnect.js

@ -1,4 +1,4 @@
include("mjsunit.js");
include("common.js");
var N = 50;
var port = 8921;

2
test/mjsunit/test-tcp-throttle-kernel-buffer.js

@ -1,4 +1,4 @@
include("mjsunit.js");
include("common.js");
PORT = 20444;
N = 30*1024; // 500kb

2
test/mjsunit/test-tcp-throttle.js

@ -1,4 +1,4 @@
include("mjsunit.js");
include("common.js");
PORT = 20443;
N = 200;

2
test/mjsunit/test-tcp-timeout.js

@ -1,4 +1,4 @@
include("mjsunit.js");
include("common.js");
port = 9992;
exchanges = 0;
starttime = null;

2
test/mjsunit/test-timers.js

@ -1,4 +1,4 @@
include("mjsunit.js");
include("common.js");
var WINDOW = 800; // why is does this need to be so big?

2
test/mjsunit/test-utf8-scripts.js

@ -1,4 +1,4 @@
include("mjsunit.js");
include("common.js");
// üäö

2
test/mjsunit/test-wait-ordering.js

@ -1,4 +1,4 @@
include("mjsunit.js");
include("common.js");
function timer (t) {
var promise = new node.Promise();

1
wscript

@ -326,3 +326,4 @@ def build(bld):
""");
bld.install_files('${PREFIX}/share/man/man1/', 'doc/node.1');
bld.install_files('${PREFIX}/bin/', 'node-repl', chmod=0755);
bld.install_files('${PREFIX}/lib/node_libraries/', 'lib/*.js');

Loading…
Cancel
Save