"use strict";

var commandLineOverride = require( "../lib/config/commandLineOverride" );

module.exports = {
	test: function( __ ) {
		__.expect( 2 );
		var tmp = commandLineOverride( [
			"--arg",
			"(flag)",
			"hello",
			"(!unflag)",
			"(bool=true,string='true',otherString='hello')",
			"tmp",
			"tmp2",
			"--help",
			"(object.flag2,!object.unflag2,object.string=world,object.int=3)",
			"end"
		] );
		__.deepEqual( tmp.argv, [
			"--arg",
			"hello",
			"tmp",
			"tmp2",
			"--help",
			"end"
		], "argv properly cleaned up" );
		__.deepEqual( tmp.data, {
			flag: true,
			unflag: false,
			bool: true,
			string: "true",
			otherString: "hello",
			object: {
				flag2: true,
				unflag2: false,
				string: "world",
				int: 3
			}
		}, "data properly constructed" );
		__.done();
	}
};

@@ -224,24 +224,25 @@
 %09%09%09%22(!unflag
+,
 )%22,%0A%09%09%09%22(boo
@@ -298,32 +298,41 @@
 mp%22,%0A%09%09%09%22tmp2%22,%0A
+%09%09%09%22()%22,%0A
 %09%09%09%22--help%22,%0A%09%09%09

Test empty expressions