usage and error output
This commit is contained in:
parent
abf11b7205
commit
6807ffed9e
|
@ -5,10 +5,20 @@
|
||||||
var path = require('path');
|
var path = require('path');
|
||||||
var dnsjs = require('../').DNSPacket;
|
var dnsjs = require('../').DNSPacket;
|
||||||
|
|
||||||
var dirname = path.join(__dirname, 'fixtures');
|
//var dirname = path.join(__dirname, 'fixtures');
|
||||||
var expected; // shim
|
//var expected; // shim
|
||||||
var onefile = process.argv[2];
|
var onefile = process.argv[2];
|
||||||
|
|
||||||
|
if (!onefile) {
|
||||||
|
console.error('');
|
||||||
|
console.error('Usage:');
|
||||||
|
console.error('node test/packer.js <test/fixtures/packet.type.json>');
|
||||||
|
console.error('Example:');
|
||||||
|
console.error('node test/packer.js test/fixtures/www.linode.com.a.json');
|
||||||
|
console.error('');
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
var json = JSON.parse(fs.readFileSync(onefile, 'utf8'));
|
var json = JSON.parse(fs.readFileSync(onefile, 'utf8'));
|
||||||
|
|
||||||
var ab = dnsjs.write(json);
|
var ab = dnsjs.write(json);
|
||||||
|
@ -44,5 +54,8 @@
|
||||||
console.log(str + '\n' + trail);
|
console.log(str + '\n' + trail);
|
||||||
console.log('');
|
console.log('');
|
||||||
|
|
||||||
|
console.error('test implementation not complete');
|
||||||
|
process.exit(1);
|
||||||
|
|
||||||
}());
|
}());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue