test: changing process.exit to return while skipping tests

This patch uses `return` statement to skip the test instead of using
`process.exit` call.

PR-URL: https://github.com/nodejs/io.js/pull/2109
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
This commit is contained in:
Sakthipriyan Vairamani 2015-07-07 20:55:55 +05:30
parent 69298d36cf
commit 79c865a53f
151 changed files with 165 additions and 165 deletions

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var https = require('https');

View File

@ -11,7 +11,7 @@
var common = require('../common');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var tls = require('tls');

View File

@ -5,7 +5,7 @@
var common = require('../common');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var tls = require('tls');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var tls = require('tls');

View File

@ -6,7 +6,7 @@ var net = require('net');
if (process.platform === 'win32') {
console.log('1..0 # Skipped: not reliable on Windows.');
process.exit(0);
return;
}
if (process.getuid() === 0) {

View File

@ -1,7 +1,7 @@
'use strict';
if (process.platform === 'win32') {
console.log('1..0 # Skipped: on windows, because clustered dgram is ENOTSUP');
process.exit(0);
return;
}
var cluster = require('cluster');

View File

@ -6,12 +6,12 @@ var net = require('net');
if (process.platform === 'win32') {
console.log('1..0 # Skipped: not reliable on Windows');
process.exit(0);
return;
}
if (process.getuid() === 0) {
console.log('1..0 # Skipped: as this test should not be run as `root`');
process.exit(0);
return;
}
if (cluster.isMaster) {

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var crypto = require('crypto');

View File

@ -9,7 +9,7 @@ var constants = require('constants');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var crypto = require('crypto');
var tls = require('tls');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var crypto = require('crypto');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var crypto = require('crypto');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var crypto = require('crypto');

View File

@ -5,7 +5,7 @@ var constants = require('constants');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var crypto = require('crypto');

View File

@ -5,7 +5,7 @@ var domain = require('domain');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var crypto = require('crypto');

View File

@ -8,7 +8,7 @@ var errors = 0;
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var crypto = require('crypto');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var crypto = require('crypto');

View File

@ -8,7 +8,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var crypto = require('crypto');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var crypto = require('crypto');

View File

@ -6,7 +6,7 @@ var path = require('path');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var crypto = require('crypto');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var crypto = require('crypto');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var crypto = require('crypto');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var crypto = require('crypto');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var crypto = require('crypto');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var crypto = require('crypto');

View File

@ -6,7 +6,7 @@ var constants = require('constants');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var crypto = require('crypto');

View File

@ -5,7 +5,7 @@ var fs = require('fs');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var crypto = require('crypto');

View File

@ -6,7 +6,7 @@ var util = require('util');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var crypto = require('crypto');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var crypto = require('crypto');
var tls = require('tls');

View File

@ -5,7 +5,7 @@ var util = require('util');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var crypto = require('crypto');

View File

@ -6,7 +6,7 @@ var dgram = require('dgram');
// skip test in FreeBSD jails since 0.0.0.0 will resolve to default interface
if (common.inFreeBSDJail) {
console.log('1..0 # Skipped: In a FreeBSD jail');
process.exit();
return;
}
dgram.createSocket('udp4').bind(common.PORT + 0, common.mustCall(function() {

View File

@ -8,7 +8,7 @@ var path = require('path');
// the directory there.
if (process.platform === 'freebsd') {
console.log('1..0 # Skipped: platform not supported.');
process.exit();
return;
}
var callbacks = 0;

View File

@ -7,7 +7,7 @@ var path = require('path');
if (process.platform === 'win32') {
console.log('1..0 # Skipped: No /dev/stdin on windows.');
process.exit();
return;
}
var fs = require('fs');

View File

@ -6,7 +6,7 @@ var assert = require('assert');
if (process.platform === 'win32') {
console.log('1..0 # Skipped: No /dev/stdin on windows.');
process.exit();
return;
}
var fs = require('fs');

View File

@ -7,7 +7,7 @@ var path = require('path');
if (process.platform === 'win32') {
console.log('1..0 # Skipped: No /dev/stdin on windows.');
process.exit();
return;
}
var fs = require('fs');

View File

@ -3,7 +3,7 @@ var common = require('../common');
var assert = require('assert');
if (!common.opensslCli) {
console.log('1..0 # Skipped: node compiled without OpenSSL CLI.');
process.exit(0);
return;
}
// http://groups.google.com/group/nodejs/browse_thread/thread/f66cd3c960406919

View File

@ -5,7 +5,7 @@ var http = require('http'),
if (!common.hasMultiLocalhost()) {
console.log('1..0 # Skipped: platform-specific test.');
process.exit();
return;
}
var server = http.createServer(function(req, res) {

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var https = require('https');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var https = require('https');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var https = require('https');

View File

@ -6,7 +6,7 @@ var http = require('http');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var https = require('https');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var https = require('https');

View File

@ -7,7 +7,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var https = require('https');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var https = require('https');

View File

@ -7,7 +7,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var https = require('https');

View File

@ -7,7 +7,7 @@ var http = require('http');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var https = require('https');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var https = require('https');

View File

@ -12,7 +12,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var https = require('https');
var tls = require('tls');

View File

@ -3,7 +3,7 @@ var common = require('../common');
if (!common.opensslCli) {
console.log('1..0 # Skipped: node compiled without OpenSSL CLI.');
process.exit(0);
return;
}
var assert = require('assert');
@ -14,7 +14,7 @@ var spawn = require('child_process').spawn;
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var https = require('https');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var https = require('https');

View File

@ -5,7 +5,7 @@ var fs = require('fs');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var https = require('https');

View File

@ -5,13 +5,13 @@ var common = require('../common'),
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var https = require('https');
if (!common.hasMultiLocalhost()) {
console.log('1..0 # Skipped: platform-specific test.');
process.exit();
return;
}
var options = {

View File

@ -5,7 +5,7 @@ var fs = require('fs');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var https = require('https');

View File

@ -7,7 +7,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var https = require('https');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var https = require('https');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var https = require('https');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var https = require('https');

View File

@ -7,7 +7,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var https = require('https');

View File

@ -5,7 +5,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var https = require('https');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var https = require('https');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var https = require('https');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var https = require('https');

View File

@ -14,7 +14,7 @@ var dlerror_msg = error_desc[process.platform];
if (!dlerror_msg) {
console.log('1..0 # Skipped: platform not supported.');
process.exit();
return;
}
try {

View File

@ -5,7 +5,7 @@ var stream = require('stream');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var crypto = require('crypto');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var tls = require('tls');

View File

@ -4,12 +4,12 @@ var assert = require('assert');
if (!common.opensslCli) {
console.log('1..0 # Skipped: node compiled without OpenSSL CLI.');
process.exit(0);
return;
}
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var tls = require('tls');

View File

@ -4,12 +4,12 @@ var assert = require('assert');
if (!common.opensslCli) {
console.log('1..0 # Skipped: node compiled without OpenSSL CLI.');
process.exit(0);
return;
}
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var tls = require('tls');

View File

@ -9,7 +9,7 @@ var constants = require('constants');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var tls = require('tls');

View File

@ -4,7 +4,7 @@ var common = require('../common');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var tls = require('tls');

View File

@ -5,7 +5,7 @@ var util = require('util');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var tls = require('tls');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var tls = require('tls');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var tls = require('tls');

View File

@ -4,7 +4,7 @@ var common = require('../common');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var tls = require('tls');

View File

@ -8,7 +8,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var tls = require('tls');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var tls = require('tls');

View File

@ -8,7 +8,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var tls = require('tls');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var tls = require('tls');

View File

@ -5,7 +5,7 @@ var common = require('../common');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var tls = require('tls');

View File

@ -4,7 +4,7 @@ var common = require('../common');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var tls = require('tls');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var tls = require('tls');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var tls = require('tls');

View File

@ -3,7 +3,7 @@ var common = require('../common');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var tls = require('tls');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var tls = require('tls');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var tls = require('tls');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var tls = require('tls');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var tls = require('tls');
var fs = require('fs');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var tls = require('tls');

View File

@ -4,7 +4,7 @@ var common = require('../common');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var tls = require('tls');
var stream = require('stream');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var tls = require('tls');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var tls = require('tls');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var tls = require('tls');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var tls = require('tls');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var tls = require('tls');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var tls = require('tls');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var tls = require('tls');

View File

@ -5,7 +5,7 @@ var common = require('../common');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var tls = require('tls');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var tls = require('tls');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var tls = require('tls');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var tls = require('tls');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var tls = require('tls');

View File

@ -4,7 +4,7 @@ var assert = require('assert');
if (!common.hasCrypto) {
console.log('1..0 # Skipped: missing crypto');
process.exit();
return;
}
var tls = require('tls');

Some files were not shown because too many files have changed in this diff Show More