var assert = require('assert');
var path = require('path');
var exec = require('child_process').execFile;
var cmd = path.join(__dirname, "..", "live-server.js");
var opts = {
	timeout: 1000,
	maxBuffer: 1024
};

describe('command line usage', function() {
	it('--version', function(done) {
		exec(cmd, [ "--version" ], opts, function(error, stdout, stdin) {
			assert(!error, error);
			assert(stdout.indexOf("live-server") == 0);
			done();
		});
	});
	it('--help', function(done) {
		exec(cmd, [ "--help" ], opts, function(error, stdout, stdin) {
			assert(!error, error);
			assert(stdout.indexOf("Usage: live-server") == 0);
			done();
		});
	});
});

@@ -178,17 +178,17 @@
 imeout: 
-1
+2
 000,%0A%09ma
@@ -413,32 +413,53 @@
 ve-server%22) == 0
+, %22version not found%22
 );%0A%09%09%09done();%0A%09%09
@@ -581,32 +581,32 @@
 !error, error);%0A
-
 %09%09%09assert(stdout
@@ -640,16 +640,253 @@
 r%22) == 0
+, %22usage not found%22);%0A%09%09%09done();%0A%09%09%7D);%0A%09%7D);%0A%09it('--quiet', function(done) %7B%0A%09%09exec(cmd, %5B %22--quiet%22, %22--no-browser%22, %22--test%22 %5D, opts, function(error, stdout, stdin) %7B%0A%09%09%09assert(!error, error);%0A%09%09%09assert(stdout === %22%22, %22stdout not empty%22
 );%0A%09%09%09do

Test for --quiet.