<commit_before>describe("System", function() {
	describe("Testing System APIs from RE1 in Ruby via AJAX", function() {
	
		beforeEach(function() {
			//document.getElementById('networkPort').innerHTML = "8999";
			//document.getElementById('connectionStatus').innerHTML = "No Status";
			//  Stop polling the network
			//stopDetectingConnection();
		});
		
	
		afterEach(function() 
		{
			//  Stop polling the network
			//stopDetectingConnection();
		});

		it ("Testing UUID, expect the length to be 32", function()
		{
			var myUUID = getUuidSync();
			expect(myUUID.length).toBe(32);
		});
		
		it ("Testing OEM, expect the returned value to not be empty", function()
		{
			var myOEM = getOemSync();
			expect(myOEM).not.toBe("");
		});
		
		//  Registry Tests
		//  4 Keys to test:
		//  (In order HKEY_CLASSES_ROOT = 0, HKEY_CURRENT_USER = 1, HKEY_LOCAL_MACHINE = 2, HKEY_USERS = 3)
		var regHivesToTest = ['HKCR', 'HKCU', 'HKLM', 'HKU'];
		//  We'll use the same subkey for each corresponding HKEY
		var regSubkeysToTest = ['http', 'software', 'software', 'userKey'];
		//  4 Types of property to test:
		//  (In order: String = 1, Binary = 3, Number = 4, Multi-line String = 7)
		var regTypesToTest = ['String', 'Binary', 'DWORD', 'MultiSZ'];
		//  We need some data to test with
		var regSettingsToTest = ['lion', 'giraffeLegs', 'zebraCount', 'cow'];
		var regValuesToTest   = ['roar', '110011', '53698', 'moo\\nmoo\\nmoo'];
		var regValuesExpected = ['roar', '110011', '53698', 'moo\nmoo\nmoo'];
			
		for (var i=0; i<regHivesToTest.length; i++) 
		{
			for (var j=0; j<regTypesToTest.length; j++)
			{
				for (var k=0; k < regTypesToTest.length; k++)
				{
					(function(idx, idy, idz) 
					{ 
						//  Test each of the Registry Types
						it ("Testing the Registry with Key: " + regHivesToTest[idx] + " and subkey " + regSubkeysToTest[idy] + " for type " + regTypesToTest[idz], function()
						{
							runs(function() 
							{		
								//  Set the Registry Key
								var setSuccess = setRegistrySync(regHivesToTest[idx], regTypesToTest[idz], regSubkeysToTest[idy], regSettingsToTest[idz], regValuesToTest[idz], false);
								expect(setSuccess).toBe("true");
								
								//  Retrieve the Registry setting
								var retrievedSetting = getRegistrySync(regHivesToTest[idx], regSubkeysToTest[idy], regSettingsToTest[idz]);
								expect(retrievedSetting).toBe(regValuesExpected[idz]);
								
								//  Delete the Registry setting
								var deleteSuccess = deleteRegistrySync(regHivesToTest[idx], regSubkeysToTest[idy], regSettingsToTest[idz], false);
								expect(deleteSuccess).toBe("true");
								
								//  Retrieve the Registry setting (this time we expect a blank string)
								var retrievedSetting = getRegistrySync(regHivesToTest[idx], regSubkeysToTest[idy], regSettingsToTest[idz]);
								expect(retrievedSetting).toBe("");

							});
						});
					})(i, j, k);
				};
			}
		}
	});
});<commit_msg>Ignoring Registry based tests if not windows<commit_after>describe("System", function() {
	describe("Testing System APIs from RE1 in Ruby via AJAX", function() {
	
		beforeEach(function() {
			//document.getElementById('networkPort').innerHTML = "8999";
			//document.getElementById('connectionStatus').innerHTML = "No Status";
			//  Stop polling the network
			//stopDetectingConnection();
		});
		
	
		afterEach(function() 
		{
			//  Stop polling the network
			//stopDetectingConnection();
		});

		it ("Testing UUID, expect the length to be 32", function()
		{
			var myUUID = getUuidSync();
			expect(myUUID.length).toBe(32);
		});
		
		it ("Testing OEM, expect the returned value to not be empty", function()
		{
			var myOEM = getOemSync();
			expect(myOEM).not.toBe("");
		});
		
		var deviceOS = Rho.System.platform;
		if(deviceOS.toLowerCase().indexOf('windows') >= 0)
		{
			//  Registry Tests
			//  4 Keys to test:
			//  (In order HKEY_CLASSES_ROOT = 0, HKEY_CURRENT_USER = 1, HKEY_LOCAL_MACHINE = 2, HKEY_USERS = 3)
			var regHivesToTest = ['HKCR', 'HKCU', 'HKLM', 'HKU'];
			//  We'll use the same subkey for each corresponding HKEY
			var regSubkeysToTest = ['http', 'software', 'software', 'userKey'];
			//  4 Types of property to test:
			//  (In order: String = 1, Binary = 3, Number = 4, Multi-line String = 7)
			var regTypesToTest = ['String', 'Binary', 'DWORD', 'MultiSZ'];
			//  We need some data to test with
			var regSettingsToTest = ['lion', 'giraffeLegs', 'zebraCount', 'cow'];
			var regValuesToTest   = ['roar', '110011', '53698', 'moo\\nmoo\\nmoo'];
			var regValuesExpected = ['roar', '110011', '53698', 'moo\nmoo\nmoo'];
				
			for (var i=0; i<regHivesToTest.length; i++) 
			{
				for (var j=0; j<regTypesToTest.length; j++)
				{
					for (var k=0; k < regTypesToTest.length; k++)
					{
						(function(idx, idy, idz) 
						{ 
							//  Test each of the Registry Types
							it ("Testing the Registry with Key: " + regHivesToTest[idx] + " and subkey " + regSubkeysToTest[idy] + " for type " + regTypesToTest[idz], function()
							{
								runs(function() 
								{		
									//  Set the Registry Key
									var setSuccess = setRegistrySync(regHivesToTest[idx], regTypesToTest[idz], regSubkeysToTest[idy], regSettingsToTest[idz], regValuesToTest[idz], false);
									expect(setSuccess).toBe("true");
									
									//  Retrieve the Registry setting
									var retrievedSetting = getRegistrySync(regHivesToTest[idx], regSubkeysToTest[idy], regSettingsToTest[idz]);
									expect(retrievedSetting).toBe(regValuesExpected[idz]);
									
									//  Delete the Registry setting
									var deleteSuccess = deleteRegistrySync(regHivesToTest[idx], regSubkeysToTest[idy], regSettingsToTest[idz], false);
									expect(deleteSuccess).toBe("true");
									
									//  Retrieve the Registry setting (this time we expect a blank string)
									var retrievedSetting = getRegistrySync(regHivesToTest[idx], regSubkeysToTest[idy], regSettingsToTest[idz]);
									expect(retrievedSetting).toBe("");

								});
							});
						})(i, j, k);
					};
				}
			}
		}
	});
});
{'fraction_non_alphanumeric': 0.14553219448094612, 'fraction_numerical': 0.01461892247043364, 'mean_word_length': 3.1421768707482993, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 4, 'https://': 0, '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': '3633934', 'n_tokens_mistral': 2587, 'n_tokens_neox': 1946, 'n_words': 487}