mirror of
				https://github.com/notepad-plus-plus/notepad-plus-plus.git
				synced 2025-10-31 03:24:04 +01:00 
			
		
		
		
	New "functionList" will be added beside of notepad++.exe or "%APPDATA%\Notepad++\", according the installation mode. If the portable package is used, after removing "doLocalConf.xml", the "functionList" folder should be copied manually from Notepad++ installed directory to "%APPDATA%\Notepad++\" to make function list work again. All splited files are localized in this folder with the explicit language name. "overrideMap.xml" is optional for overriding the default functionList parse rule files, and for adding UDL parse rule files. Close #4896
		
			
				
	
	
		
			68 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			PowerShell
		
	
	
	
	
	
			
		
		
	
	
			68 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			PowerShell
		
	
	
	
	
	
| $testRoot = ".\"
 | |
| 
 | |
| Get-ChildItem -Path $testRoot -Attribute Directory | 
 | |
| Foreach-Object {
 | |
| 
 | |
| 		$dirName = (Get-Item $testRoot$_).Name
 | |
| 		$langName = $dirName
 | |
| 		$sw = [Diagnostics.Stopwatch]::StartNew()
 | |
| 		$result = & ".\unitTest.ps1" $dirName $langName
 | |
| 		$sw.Stop()
 | |
| 		"Test: " + $sw.Elapsed.TotalMilliseconds + " ms"
 | |
| 
 | |
| 		
 | |
| 		if ($result -eq 0)
 | |
| 		{
 | |
| 			"$dirName ... OK"
 | |
| 		}
 | |
| 		elseif ($result -eq 1)
 | |
| 		{		
 | |
| 			"$dirName ... unitTest file not found. Test skipped."
 | |
| 		}
 | |
| 		elseif ($result -eq -1)
 | |
| 		{
 | |
| 			"$dirName ... KO"
 | |
| 			"result = $result"
 | |
| 			"There are some problems in your $dirName.xml"
 | |
| 			exit -1
 | |
| 		}
 | |
| 		elseif ($result -eq -2)
 | |
| 		{
 | |
| 			"Exception!"
 | |
| 			exit -1
 | |
| 		}
 | |
| 		else
 | |
| 		{
 | |
| 			"It should not happen - check your script."
 | |
| 			exit -1
 | |
| 		}
 | |
| 		
 | |
| 		# Check all Sub-directories for other unit-tests
 | |
| 		Get-ChildItem -Path $testRoot\$dirName -Attribute Directory | 
 | |
| 		Foreach-Object {
 | |
| 
 | |
| 				$subDirName = (Get-Item $testRoot$dirName\$_).Name
 | |
| 				$sw = [Diagnostics.Stopwatch]::StartNew()
 | |
| 				$subResult = &.\unitTest.ps1 $langName\$subDirName $langName
 | |
| 				$sw.Stop()
 | |
| 				"Test:" + $sw.Elapsed.TotalMilliseconds + " ms"
 | |
| 				if ($subResult -eq 0)
 | |
| 				{
 | |
| 					"$dirName-$subDirName ... OK"
 | |
| 				}
 | |
| 				elseif ($subResult -eq 1)
 | |
| 				{		
 | |
| 					"$dirName-$subDirName ... unitTest file not found. Test skipped."
 | |
| 				}
 | |
| 				else
 | |
| 				{
 | |
| 					"$dirName-$subDirName ... KO"
 | |
| 					""
 | |
| 					"There are some problems in your $dirName.xml"
 | |
| 					exit -1
 | |
| 				}
 | |
| 		}
 | |
| }
 | |
| ""
 | |
| "All tests are passed."
 | |
| exit 0 |