<commit_before>import haxe.Constraints;
import haxe.*;
import js.Node.*;
using Reflect;
using Lambda;

/**
	Promise interface of [Q](https://github.com/kriskowal/q).
	Incomplete.
*/
private typedef Promise = {
	public function then(onResolve:Function, ?onReject:Function):Promise;
	public function fail(onReject:Function):Promise;
}

/**
	Run tests on SauceLabs.

	Usage: npm install wd q && node RunSauceLabs.js testFile.html [...testFile2.html] [options]
	Options:
		-serve-domain <domain>		Domain of the server that serves the test files. Default: localhost
		-serve-port <port>			Port number of the server that serves the test files. Default: 2000
		-connect-domain <domain>	Domain of the remote testing server. Default: localhost (using Sauce Connect)
		-connect-port <port>		Port number of remote testing server. Default: 4445 (using Sauce Connect)
		-browsers <browsers>		A list of browsers to test with in JSON format. Default: refer to source code

	When a test finishes, it should set `window.success` to a boolean.
*/
class RunSauceLabs {
	static function successMsg(msg:String):Void {
		console.log('\x1b[32m' + msg + '\x1b[0m');
	}
	static function failMsg(msg:String):Void {
		console.log('\x1b[31m' + msg + '\x1b[0m');
	}
	static function infoMsg(msg:String):Void {
		console.log('\x1b[36m' + msg + '\x1b[0m');
	}

	static function main():Void {
		var serveDomain = "localhost";
		var servePort = "2000";
		var connectDomain = "localhost";
		var connectPort = "4445";
		var urls = [];

		//https://saucelabs.com/platforms
		var browsers:Array<Dynamic> = [
			// {
			// 	"browserName": "internet explorer",
			// 	"platform": "Windows XP",
			// 	"version": "6"
			// },
			// {
			// 	"browserName": "internet explorer",
			// 	"platform": "Windows XP",
			// 	"version": "7"
			// },
			{
				"browserName": "internet explorer",
				"platform": "Windows XP",
				"version": "8"
			},
			{
				"browserName": "internet explorer",
				"platform": "Windows 7",
				"version": "9"
			},
			{
				"browserName": "internet explorer",
				"platform": "Windows 7",
				"version": "10"
			},
			{
				"browserName": "internet explorer",
				"platform": "Windows 8.1",
				"version": "11"
			},
			{
				"browserName": "chrome",
				"platform": "Windows XP"
			},
			{
				"browserName": "firefox",
				"platform": "Windows XP"
			},
			{
				"browserName": "safari",
				"platform": "OS X 10.6",
				"version": "5"
			},
			{
				"browserName": "safari",
				"platform": "OS X 10.8",
				"version": "6"
			},
			{
				"browserName": "safari",
				"platform": "OS X 10.9",
				"version": "7"
			},
			{
				"browserName": "safari",
				"platform": "OS X 10.10",
				"version": "8"
			},
			{
				"browserName": "iphone",
				"platform": "OS X 10.8",
				"version": "6.1",
				"device-orientation": "portrait"
			},
			{
				"browserName": "iphone",
				"platform": "OS X 10.9",
				"version": "8.1",
				"device-orientation": "portrait"
			},
			//{
				//"browserName": "android",
				//"platform": "Linux",
				//"version": "4.0",
				//"device-orientation": "portrait"
			//},
			{
				"browserName": "android",
				"platform": "Linux",
				"version": "4.3",
				"device-orientation": "portrait"
			}
		];

		var arg, args = process.argv.slice(2);
		while ((arg = args.shift()) != null) {
			switch (arg) {<commit_msg>[ci] activate android 4 testing again<commit_after>import haxe.Constraints;
import haxe.*;
import js.Node.*;
using Reflect;
using Lambda;

/**
	Promise interface of [Q](https://github.com/kriskowal/q).
	Incomplete.
*/
private typedef Promise = {
	public function then(onResolve:Function, ?onReject:Function):Promise;
	public function fail(onReject:Function):Promise;
}

/**
	Run tests on SauceLabs.

	Usage: npm install wd q && node RunSauceLabs.js testFile.html [...testFile2.html] [options]
	Options:
		-serve-domain <domain>		Domain of the server that serves the test files. Default: localhost
		-serve-port <port>			Port number of the server that serves the test files. Default: 2000
		-connect-domain <domain>	Domain of the remote testing server. Default: localhost (using Sauce Connect)
		-connect-port <port>		Port number of remote testing server. Default: 4445 (using Sauce Connect)
		-browsers <browsers>		A list of browsers to test with in JSON format. Default: refer to source code

	When a test finishes, it should set `window.success` to a boolean.
*/
class RunSauceLabs {
	static function successMsg(msg:String):Void {
		console.log('\x1b[32m' + msg + '\x1b[0m');
	}
	static function failMsg(msg:String):Void {
		console.log('\x1b[31m' + msg + '\x1b[0m');
	}
	static function infoMsg(msg:String):Void {
		console.log('\x1b[36m' + msg + '\x1b[0m');
	}

	static function main():Void {
		var serveDomain = "localhost";
		var servePort = "2000";
		var connectDomain = "localhost";
		var connectPort = "4445";
		var urls = [];

		//https://saucelabs.com/platforms
		var browsers:Array<Dynamic> = [
			// {
			// 	"browserName": "internet explorer",
			// 	"platform": "Windows XP",
			// 	"version": "6"
			// },
			// {
			// 	"browserName": "internet explorer",
			// 	"platform": "Windows XP",
			// 	"version": "7"
			// },
			{
				"browserName": "internet explorer",
				"platform": "Windows XP",
				"version": "8"
			},
			{
				"browserName": "internet explorer",
				"platform": "Windows 7",
				"version": "9"
			},
			{
				"browserName": "internet explorer",
				"platform": "Windows 7",
				"version": "10"
			},
			{
				"browserName": "internet explorer",
				"platform": "Windows 8.1",
				"version": "11"
			},
			{
				"browserName": "chrome",
				"platform": "Windows XP"
			},
			{
				"browserName": "firefox",
				"platform": "Windows XP"
			},
			{
				"browserName": "safari",
				"platform": "OS X 10.6",
				"version": "5"
			},
			{
				"browserName": "safari",
				"platform": "OS X 10.8",
				"version": "6"
			},
			{
				"browserName": "safari",
				"platform": "OS X 10.9",
				"version": "7"
			},
			{
				"browserName": "safari",
				"platform": "OS X 10.10",
				"version": "8"
			},
			{
				"browserName": "iphone",
				"platform": "OS X 10.8",
				"version": "6.1",
				"device-orientation": "portrait"
			},
			{
				"browserName": "iphone",
				"platform": "OS X 10.9",
				"version": "8.1",
				"device-orientation": "portrait"
			},
			{
				"browserName": "android",
				"platform": "Linux",
				"version": "4.0",
				"device-orientation": "portrait"
			},
			{
				"browserName": "android",
				"platform": "Linux",
				"version": "4.3",
				"device-orientation": "portrait"
			}
		];

		var arg, args = process.argv.slice(2);
		while ((arg = args.shift()) != null) {
			switch (arg) {
{'fraction_non_alphanumeric': 0.1793641271745651, 'fraction_numerical': 0.022945410917816437, 'mean_word_length': 2.9886363636363638, 'pattern_counts': {'":': 100, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '220919', 'n_tokens_mistral': 2935, 'n_tokens_neox': 2360, 'n_words': 599}