Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
test: include common.js in all tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoordhuis committed Feb 20, 2012
1 parent 028043d commit 7f4aba9
Show file tree
Hide file tree
Showing 36 changed files with 39 additions and 3 deletions.
1 change: 1 addition & 0 deletions test/disabled/GH-670.js
Expand Up @@ -19,6 +19,7 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

var common = require('../common');
var assert = require('assert');
var https = require('https');
var tls = require('tls');
Expand Down
1 change: 1 addition & 0 deletions test/disabled/test-child-process-uid-gid.js
Expand Up @@ -22,6 +22,7 @@



var common = require('../common');
var assert = require('assert');
var spawn = require('child_process').spawn;
var fs = require('fs');
Expand Down
1 change: 1 addition & 0 deletions test/disabled/test-http-default-port.js
Expand Up @@ -24,6 +24,7 @@

// This must be run as root.

var common = require('../common');
var http = require('http'),
https = require('https'),
PORT = 80,
Expand Down
1 change: 1 addition & 0 deletions test/disabled/test-https-loop-to-google.js
Expand Up @@ -28,6 +28,7 @@
// Tested on node 0.5.0-pre commit 9851574


var common = require('../common');
var https = require('https');

for (var i = 0; i < 10; ++i)
Expand Down
1 change: 1 addition & 0 deletions test/internet/test-dns.js
Expand Up @@ -19,6 +19,7 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

var common = require('../common');
var assert = require('assert'),
dns = require('dns'),
net = require('net'),
Expand Down
1 change: 1 addition & 0 deletions test/pummel/test-net-timeout2.js
Expand Up @@ -22,6 +22,7 @@
// socket.write was not resetting the timeout timer. See
// https://github.com/joyent/node/issues/2002

var common = require('../common');
var assert = require('assert');
var net = require('net');

Expand Down
1 change: 1 addition & 0 deletions test/pummel/test-process-uptime.js
Expand Up @@ -22,6 +22,7 @@



var common = require('../common');
var assert = require('assert');

console.error(process.uptime());
Expand Down
1 change: 1 addition & 0 deletions test/simple/path.js
Expand Up @@ -23,6 +23,7 @@


// 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.
// 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.
Expand Down
1 change: 1 addition & 0 deletions test/simple/test-child-process-double-pipe.js
Expand Up @@ -21,6 +21,7 @@

var is_windows = process.platform === 'win32';

var common = require('../common');
var assert = require('assert'),
util = require('util'),
spawn = require('child_process').spawn;
Expand Down
1 change: 1 addition & 0 deletions test/simple/test-eio-limit.js
Expand Up @@ -19,6 +19,7 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

var common = require('../common');
var assert = require('assert'),
zlib = require('zlib'),
started = 0,
Expand Down
1 change: 1 addition & 0 deletions test/simple/test-event-emitter-check-listener-leaks.js
Expand Up @@ -19,6 +19,7 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

var common = require('../common');
var assert = require('assert');
var events = require('events');

Expand Down
1 change: 1 addition & 0 deletions test/simple/test-fs-exists.js
Expand Up @@ -19,6 +19,7 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

var common = require('../common');
var assert = require('assert');
var fs = require('fs');
var f = __filename;
Expand Down
1 change: 1 addition & 0 deletions test/simple/test-http-parser-bad-ref.js
Expand Up @@ -3,6 +3,7 @@

// Flags: --expose_gc

var common = require('../common');
var assert = require('assert');
var HTTPParser = process.binding('http_parser').HTTPParser;

Expand Down
1 change: 1 addition & 0 deletions test/simple/test-net-dns-error.js
Expand Up @@ -19,6 +19,7 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

var common = require('../common');
var assert = require('assert');

var net = require('net');
Expand Down
1 change: 1 addition & 0 deletions test/simple/test-pipe-return-val.js
Expand Up @@ -24,6 +24,7 @@

// This test ensures SourceStream.pipe(DestStream) returns DestStream

var common = require('../common');
var Stream = require('stream').Stream;
var assert = require('assert');
var util = require('util');
Expand Down
7 changes: 4 additions & 3 deletions test/simple/test-process-env.js
Expand Up @@ -22,8 +22,9 @@
// first things first, set the timezone; see tzset(3)
process.env.TZ = 'Europe/Amsterdam';

assert = require('assert');
spawn = require('child_process').spawn;
var common = require('../common');
var assert = require('assert');
var spawn = require('child_process').spawn;

/* For the moment we are not going to support setting the timezone via the
* environment variables. The problem is that various V8 platform backends
Expand Down Expand Up @@ -57,7 +58,7 @@ if (process.argv[2] == 'you-are-the-child') {
delete process.env.NODE_PROCESS_ENV_DELETED;
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.stderr.on('data', function(data) { console.log(data.toString()); });
child.on('exit', function(statusCode) {
Expand Down
1 change: 1 addition & 0 deletions test/simple/test-process-exit.js
Expand Up @@ -19,6 +19,7 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

var common = require('../common');
var assert = require('assert');

// recursively calling .exit() should not overflow the call stack
Expand Down
1 change: 1 addition & 0 deletions test/simple/test-process-kill-null.js
Expand Up @@ -20,6 +20,7 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.


var common = require('../common');
var assert = require('assert');
var spawn = require('child_process').spawn;

Expand Down
1 change: 1 addition & 0 deletions test/simple/test-process-next-tick.js
Expand Up @@ -19,6 +19,7 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

var common = require('../common');
var assert = require('assert');
var N = 2;
var tickCount = 0;
Expand Down
1 change: 1 addition & 0 deletions test/simple/test-punycode.js
Expand Up @@ -39,6 +39,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

var common = require('../common');
var punycode = require('punycode');
var assert = require('assert');

Expand Down
1 change: 1 addition & 0 deletions test/simple/test-readdouble.js
Expand Up @@ -23,6 +23,7 @@
* Tests to verify we're reading in doubles correctly
*/
var SlowBuffer = process.binding('buffer').SlowBuffer;
var common = require('../common');
var ASSERT = require('assert');

/*
Expand Down
1 change: 1 addition & 0 deletions test/simple/test-readfloat.js
Expand Up @@ -23,6 +23,7 @@
* Tests to verify we're reading in floats correctly
*/
var SlowBuffer = process.binding('buffer').SlowBuffer;
var common = require('../common');
var ASSERT = require('assert');

/*
Expand Down
1 change: 1 addition & 0 deletions test/simple/test-readint.js
Expand Up @@ -23,6 +23,7 @@
* Tests to verify we're reading in signed integers correctly
*/
var SlowBuffer = process.binding('buffer').SlowBuffer;
var common = require('../common');
var ASSERT = require('assert');

/*
Expand Down
1 change: 1 addition & 0 deletions test/simple/test-readuint.js
Expand Up @@ -24,6 +24,7 @@
*/

var SlowBuffer = process.binding('buffer').SlowBuffer;
var common = require('../common');
var ASSERT = require('assert');

/*
Expand Down
1 change: 1 addition & 0 deletions test/simple/test-regress-GH-1697.js
Expand Up @@ -19,6 +19,7 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

var common = require('../common');
var net = require('net'),
cp = require('child_process'),
util = require('util');
Expand Down
1 change: 1 addition & 0 deletions test/simple/test-repl-tab-complete.js
Expand Up @@ -19,6 +19,7 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

var common = require('../common');
var assert = require('assert');
var util = require('util');

Expand Down
1 change: 1 addition & 0 deletions test/simple/test-setproctitle.js
Expand Up @@ -27,6 +27,7 @@ if ('linux freebsd'.indexOf(process.platform) === -1) {
process.exit();
}

var common = require('../common');
var assert = require('assert');
var exec = require('child_process').exec;

Expand Down
1 change: 1 addition & 0 deletions test/simple/test-stdin-child-proc.js
Expand Up @@ -21,6 +21,7 @@

// 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
var common = require('../common');
var child_process = require('child_process');
var path = require('path');
child_process.spawn(process.execPath,
Expand Down
1 change: 1 addition & 0 deletions test/simple/test-stream-pipe-cleanup.js
Expand Up @@ -22,6 +22,7 @@
// This test asserts that Stream.prototype.pipe does not leave listeners
// hanging on the source or dest.

var common = require('../common');
var stream = require('stream');
var assert = require('assert');
var util = require('util');
Expand Down
1 change: 1 addition & 0 deletions test/simple/test-stream-pipe-event.js
Expand Up @@ -19,6 +19,7 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

var common = require('../common');
var stream = require('stream');
var assert = require('assert');
var util = require('util');
Expand Down
1 change: 1 addition & 0 deletions test/simple/test-typed-arrays.js
Expand Up @@ -25,6 +25,7 @@
* verify Buffer can used in Typed Arrays
*/

var common = require('../common');
var assert = require('assert');
var SlowBuffer = process.binding('buffer').SlowBuffer;
var ArrayBuffer = process.binding('typed_array').ArrayBuffer;
Expand Down
1 change: 1 addition & 0 deletions test/simple/test-writedouble.js
Expand Up @@ -23,6 +23,7 @@
* Tests to verify we're writing doubles correctly
*/
var SlowBuffer = process.binding('buffer').SlowBuffer;
var common = require('../common');
var ASSERT = require('assert');

function test(clazz) {
Expand Down
1 change: 1 addition & 0 deletions test/simple/test-writefloat.js
Expand Up @@ -23,6 +23,7 @@
* Tests to verify we're writing floats correctly
*/
var SlowBuffer = process.binding('buffer').SlowBuffer;
var common = require('../common');
var ASSERT = require('assert');

function test(clazz) {
Expand Down
1 change: 1 addition & 0 deletions test/simple/test-writeint.js
Expand Up @@ -23,6 +23,7 @@
* Tests to verify we're writing signed integers correctly
*/
var SlowBuffer = process.binding('buffer').SlowBuffer;
var common = require('../common');
var ASSERT = require('assert');

function test8(clazz) {
Expand Down
1 change: 1 addition & 0 deletions test/simple/test-writeuint.js
Expand Up @@ -23,6 +23,7 @@
* A battery of tests to help us read a series of uints
*/
var SlowBuffer = process.binding('buffer').SlowBuffer;
var common = require('../common');
var ASSERT = require('assert');

/*
Expand Down
1 change: 1 addition & 0 deletions test/simple/test-zlib-random-byte-pipes.js
Expand Up @@ -19,6 +19,7 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

var common = require('../common');
var crypto = require('crypto');
var stream = require('stream');
var Stream = stream.Stream;
Expand Down

0 comments on commit 7f4aba9

Please sign in to comment.