Browse Source

test: include common.js in all tests

v0.9.1-release
Ben Noordhuis 13 years ago
parent
commit
7f4aba91d3
  1. 1
      test/disabled/GH-670.js
  2. 1
      test/disabled/test-child-process-uid-gid.js
  3. 1
      test/disabled/test-http-default-port.js
  4. 1
      test/disabled/test-https-loop-to-google.js
  5. 1
      test/internet/test-dns.js
  6. 1
      test/pummel/test-net-timeout2.js
  7. 1
      test/pummel/test-process-uptime.js
  8. 1
      test/simple/path.js
  9. 1
      test/simple/test-child-process-double-pipe.js
  10. 1
      test/simple/test-eio-limit.js
  11. 1
      test/simple/test-event-emitter-check-listener-leaks.js
  12. 1
      test/simple/test-fs-exists.js
  13. 1
      test/simple/test-http-parser-bad-ref.js
  14. 1
      test/simple/test-net-dns-error.js
  15. 1
      test/simple/test-pipe-return-val.js
  16. 7
      test/simple/test-process-env.js
  17. 1
      test/simple/test-process-exit.js
  18. 1
      test/simple/test-process-kill-null.js
  19. 1
      test/simple/test-process-next-tick.js
  20. 1
      test/simple/test-punycode.js
  21. 1
      test/simple/test-readdouble.js
  22. 1
      test/simple/test-readfloat.js
  23. 1
      test/simple/test-readint.js
  24. 1
      test/simple/test-readuint.js
  25. 1
      test/simple/test-regress-GH-1697.js
  26. 1
      test/simple/test-repl-tab-complete.js
  27. 1
      test/simple/test-setproctitle.js
  28. 1
      test/simple/test-stdin-child-proc.js
  29. 1
      test/simple/test-stream-pipe-cleanup.js
  30. 1
      test/simple/test-stream-pipe-event.js
  31. 1
      test/simple/test-typed-arrays.js
  32. 1
      test/simple/test-writedouble.js
  33. 1
      test/simple/test-writefloat.js
  34. 1
      test/simple/test-writeint.js
  35. 1
      test/simple/test-writeuint.js
  36. 1
      test/simple/test-zlib-random-byte-pipes.js

1
test/disabled/GH-670.js

@ -19,6 +19,7 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE. // USE OR OTHER DEALINGS IN THE SOFTWARE.
var common = require('../common');
var assert = require('assert'); var assert = require('assert');
var https = require('https'); var https = require('https');
var tls = require('tls'); var tls = require('tls');

1
test/disabled/test-child-process-uid-gid.js

@ -22,6 +22,7 @@
var common = require('../common');
var assert = require('assert'); var assert = require('assert');
var spawn = require('child_process').spawn; var spawn = require('child_process').spawn;
var fs = require('fs'); var fs = require('fs');

1
test/disabled/test-http-default-port.js

@ -24,6 +24,7 @@
// This must be run as root. // This must be run as root.
var common = require('../common');
var http = require('http'), var http = require('http'),
https = require('https'), https = require('https'),
PORT = 80, PORT = 80,

1
test/disabled/test-https-loop-to-google.js

@ -28,6 +28,7 @@
// Tested on node 0.5.0-pre commit 9851574 // Tested on node 0.5.0-pre commit 9851574
var common = require('../common');
var https = require('https'); var https = require('https');
for (var i = 0; i < 10; ++i) for (var i = 0; i < 10; ++i)

1
test/internet/test-dns.js

@ -19,6 +19,7 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE. // USE OR OTHER DEALINGS IN THE SOFTWARE.
var common = require('../common');
var assert = require('assert'), var assert = require('assert'),
dns = require('dns'), dns = require('dns'),
net = require('net'), net = require('net'),

1
test/pummel/test-net-timeout2.js

@ -22,6 +22,7 @@
// socket.write was not resetting the timeout timer. See // socket.write was not resetting the timeout timer. See
// https://github.com/joyent/node/issues/2002 // https://github.com/joyent/node/issues/2002
var common = require('../common');
var assert = require('assert'); var assert = require('assert');
var net = require('net'); var net = require('net');

1
test/pummel/test-process-uptime.js

@ -22,6 +22,7 @@
var common = require('../common');
var assert = require('assert'); var assert = require('assert');
console.error(process.uptime()); console.error(process.uptime());

1
test/simple/path.js

@ -23,6 +23,7 @@
// This is actually more a fixture than a test. It is used to make // This is actually more a fixture than a test. It is used to make
var common = require('../common');
// sure that require('./path') and require('path') do different things. // sure that require('./path') and require('path') do different things.
// It has to be in the same directory as the test 'test-module-loading.js' // It has to be in the same directory as the test 'test-module-loading.js'
// and it has to have the same name as an internal module. // and it has to have the same name as an internal module.

1
test/simple/test-child-process-double-pipe.js

@ -21,6 +21,7 @@
var is_windows = process.platform === 'win32'; var is_windows = process.platform === 'win32';
var common = require('../common');
var assert = require('assert'), var assert = require('assert'),
util = require('util'), util = require('util'),
spawn = require('child_process').spawn; spawn = require('child_process').spawn;

1
test/simple/test-eio-limit.js

@ -19,6 +19,7 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE. // USE OR OTHER DEALINGS IN THE SOFTWARE.
var common = require('../common');
var assert = require('assert'), var assert = require('assert'),
zlib = require('zlib'), zlib = require('zlib'),
started = 0, started = 0,

1
test/simple/test-event-emitter-check-listener-leaks.js

@ -19,6 +19,7 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE. // USE OR OTHER DEALINGS IN THE SOFTWARE.
var common = require('../common');
var assert = require('assert'); var assert = require('assert');
var events = require('events'); var events = require('events');

1
test/simple/test-fs-exists.js

@ -19,6 +19,7 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE. // USE OR OTHER DEALINGS IN THE SOFTWARE.
var common = require('../common');
var assert = require('assert'); var assert = require('assert');
var fs = require('fs'); var fs = require('fs');
var f = __filename; var f = __filename;

1
test/simple/test-http-parser-bad-ref.js

@ -3,6 +3,7 @@
// Flags: --expose_gc // Flags: --expose_gc
var common = require('../common');
var assert = require('assert'); var assert = require('assert');
var HTTPParser = process.binding('http_parser').HTTPParser; var HTTPParser = process.binding('http_parser').HTTPParser;

1
test/simple/test-net-dns-error.js

@ -19,6 +19,7 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE. // USE OR OTHER DEALINGS IN THE SOFTWARE.
var common = require('../common');
var assert = require('assert'); var assert = require('assert');
var net = require('net'); var net = require('net');

1
test/simple/test-pipe-return-val.js

@ -24,6 +24,7 @@
// This test ensures SourceStream.pipe(DestStream) returns DestStream // This test ensures SourceStream.pipe(DestStream) returns DestStream
var common = require('../common');
var Stream = require('stream').Stream; var Stream = require('stream').Stream;
var assert = require('assert'); var assert = require('assert');
var util = require('util'); var util = require('util');

7
test/simple/test-process-env.js

@ -22,8 +22,9 @@
// first things first, set the timezone; see tzset(3) // first things first, set the timezone; see tzset(3)
process.env.TZ = 'Europe/Amsterdam'; process.env.TZ = 'Europe/Amsterdam';
assert = require('assert'); var common = require('../common');
spawn = require('child_process').spawn; var assert = require('assert');
var spawn = require('child_process').spawn;
/* For the moment we are not going to support setting the timezone via the /* For the moment we are not going to support setting the timezone via the
* environment variables. The problem is that various V8 platform backends * environment variables. The problem is that various V8 platform backends
@ -57,7 +58,7 @@ if (process.argv[2] == 'you-are-the-child') {
delete process.env.NODE_PROCESS_ENV_DELETED; delete process.env.NODE_PROCESS_ENV_DELETED;
assert.equal(false, 'NODE_PROCESS_ENV_DELETED' in process.env); assert.equal(false, 'NODE_PROCESS_ENV_DELETED' in process.env);
child = spawn(process.argv[0], [process.argv[1], 'you-are-the-child']); var child = spawn(process.argv[0], [process.argv[1], 'you-are-the-child']);
child.stdout.on('data', function(data) { console.log(data.toString()); }); child.stdout.on('data', function(data) { console.log(data.toString()); });
child.stderr.on('data', function(data) { console.log(data.toString()); }); child.stderr.on('data', function(data) { console.log(data.toString()); });
child.on('exit', function(statusCode) { child.on('exit', function(statusCode) {

1
test/simple/test-process-exit.js

@ -19,6 +19,7 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE. // USE OR OTHER DEALINGS IN THE SOFTWARE.
var common = require('../common');
var assert = require('assert'); var assert = require('assert');
// recursively calling .exit() should not overflow the call stack // recursively calling .exit() should not overflow the call stack

1
test/simple/test-process-kill-null.js

@ -20,6 +20,7 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE. // USE OR OTHER DEALINGS IN THE SOFTWARE.
var common = require('../common');
var assert = require('assert'); var assert = require('assert');
var spawn = require('child_process').spawn; var spawn = require('child_process').spawn;

1
test/simple/test-process-next-tick.js

@ -19,6 +19,7 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE. // USE OR OTHER DEALINGS IN THE SOFTWARE.
var common = require('../common');
var assert = require('assert'); var assert = require('assert');
var N = 2; var N = 2;
var tickCount = 0; var tickCount = 0;

1
test/simple/test-punycode.js

@ -39,6 +39,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE. // THE SOFTWARE.
var common = require('../common');
var punycode = require('punycode'); var punycode = require('punycode');
var assert = require('assert'); var assert = require('assert');

1
test/simple/test-readdouble.js

@ -23,6 +23,7 @@
* Tests to verify we're reading in doubles correctly * Tests to verify we're reading in doubles correctly
*/ */
var SlowBuffer = process.binding('buffer').SlowBuffer; var SlowBuffer = process.binding('buffer').SlowBuffer;
var common = require('../common');
var ASSERT = require('assert'); var ASSERT = require('assert');
/* /*

1
test/simple/test-readfloat.js

@ -23,6 +23,7 @@
* Tests to verify we're reading in floats correctly * Tests to verify we're reading in floats correctly
*/ */
var SlowBuffer = process.binding('buffer').SlowBuffer; var SlowBuffer = process.binding('buffer').SlowBuffer;
var common = require('../common');
var ASSERT = require('assert'); var ASSERT = require('assert');
/* /*

1
test/simple/test-readint.js

@ -23,6 +23,7 @@
* Tests to verify we're reading in signed integers correctly * Tests to verify we're reading in signed integers correctly
*/ */
var SlowBuffer = process.binding('buffer').SlowBuffer; var SlowBuffer = process.binding('buffer').SlowBuffer;
var common = require('../common');
var ASSERT = require('assert'); var ASSERT = require('assert');
/* /*

1
test/simple/test-readuint.js

@ -24,6 +24,7 @@
*/ */
var SlowBuffer = process.binding('buffer').SlowBuffer; var SlowBuffer = process.binding('buffer').SlowBuffer;
var common = require('../common');
var ASSERT = require('assert'); var ASSERT = require('assert');
/* /*

1
test/simple/test-regress-GH-1697.js

@ -19,6 +19,7 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE. // USE OR OTHER DEALINGS IN THE SOFTWARE.
var common = require('../common');
var net = require('net'), var net = require('net'),
cp = require('child_process'), cp = require('child_process'),
util = require('util'); util = require('util');

1
test/simple/test-repl-tab-complete.js

@ -19,6 +19,7 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE. // USE OR OTHER DEALINGS IN THE SOFTWARE.
var common = require('../common');
var assert = require('assert'); var assert = require('assert');
var util = require('util'); var util = require('util');

1
test/simple/test-setproctitle.js

@ -27,6 +27,7 @@ if ('linux freebsd'.indexOf(process.platform) === -1) {
process.exit(); process.exit();
} }
var common = require('../common');
var assert = require('assert'); var assert = require('assert');
var exec = require('child_process').exec; var exec = require('child_process').exec;

1
test/simple/test-stdin-child-proc.js

@ -21,6 +21,7 @@
// This tests that pausing and resuming stdin does not hang and timeout // This tests that pausing and resuming stdin does not hang and timeout
// when done in a child process. See test/simple/test-stdin-pause-resume.js // when done in a child process. See test/simple/test-stdin-pause-resume.js
var common = require('../common');
var child_process = require('child_process'); var child_process = require('child_process');
var path = require('path'); var path = require('path');
child_process.spawn(process.execPath, child_process.spawn(process.execPath,

1
test/simple/test-stream-pipe-cleanup.js

@ -22,6 +22,7 @@
// This test asserts that Stream.prototype.pipe does not leave listeners // This test asserts that Stream.prototype.pipe does not leave listeners
// hanging on the source or dest. // hanging on the source or dest.
var common = require('../common');
var stream = require('stream'); var stream = require('stream');
var assert = require('assert'); var assert = require('assert');
var util = require('util'); var util = require('util');

1
test/simple/test-stream-pipe-event.js

@ -19,6 +19,7 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE. // USE OR OTHER DEALINGS IN THE SOFTWARE.
var common = require('../common');
var stream = require('stream'); var stream = require('stream');
var assert = require('assert'); var assert = require('assert');
var util = require('util'); var util = require('util');

1
test/simple/test-typed-arrays.js

@ -25,6 +25,7 @@
* verify Buffer can used in Typed Arrays * verify Buffer can used in Typed Arrays
*/ */
var common = require('../common');
var assert = require('assert'); var assert = require('assert');
var SlowBuffer = process.binding('buffer').SlowBuffer; var SlowBuffer = process.binding('buffer').SlowBuffer;
var ArrayBuffer = process.binding('typed_array').ArrayBuffer; var ArrayBuffer = process.binding('typed_array').ArrayBuffer;

1
test/simple/test-writedouble.js

@ -23,6 +23,7 @@
* Tests to verify we're writing doubles correctly * Tests to verify we're writing doubles correctly
*/ */
var SlowBuffer = process.binding('buffer').SlowBuffer; var SlowBuffer = process.binding('buffer').SlowBuffer;
var common = require('../common');
var ASSERT = require('assert'); var ASSERT = require('assert');
function test(clazz) { function test(clazz) {

1
test/simple/test-writefloat.js

@ -23,6 +23,7 @@
* Tests to verify we're writing floats correctly * Tests to verify we're writing floats correctly
*/ */
var SlowBuffer = process.binding('buffer').SlowBuffer; var SlowBuffer = process.binding('buffer').SlowBuffer;
var common = require('../common');
var ASSERT = require('assert'); var ASSERT = require('assert');
function test(clazz) { function test(clazz) {

1
test/simple/test-writeint.js

@ -23,6 +23,7 @@
* Tests to verify we're writing signed integers correctly * Tests to verify we're writing signed integers correctly
*/ */
var SlowBuffer = process.binding('buffer').SlowBuffer; var SlowBuffer = process.binding('buffer').SlowBuffer;
var common = require('../common');
var ASSERT = require('assert'); var ASSERT = require('assert');
function test8(clazz) { function test8(clazz) {

1
test/simple/test-writeuint.js

@ -23,6 +23,7 @@
* A battery of tests to help us read a series of uints * A battery of tests to help us read a series of uints
*/ */
var SlowBuffer = process.binding('buffer').SlowBuffer; var SlowBuffer = process.binding('buffer').SlowBuffer;
var common = require('../common');
var ASSERT = require('assert'); var ASSERT = require('assert');
/* /*

1
test/simple/test-zlib-random-byte-pipes.js

@ -19,6 +19,7 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE. // USE OR OTHER DEALINGS IN THE SOFTWARE.
var common = require('../common');
var crypto = require('crypto'); var crypto = require('crypto');
var stream = require('stream'); var stream = require('stream');
var Stream = stream.Stream; var Stream = stream.Stream;

Loading…
Cancel
Save