2018-04-13 10:46:03 +00:00
|
|
|
|
|
|
|
$testRoot = ".\"
|
|
|
|
|
|
|
|
Get-ChildItem $testRoot -Filter *.* |
|
|
|
|
Foreach-Object {
|
|
|
|
if ((Get-Item $testRoot$_) -is [System.IO.DirectoryInfo])
|
2020-08-25 00:21:51 +00:00
|
|
|
{
|
|
|
|
$dirName = (Get-Item $testRoot$_).Name
|
|
|
|
..\..\bin\notepad++.exe -export=functionList -l"$dirName" $testRoot$_\unitTest | Out-Null
|
|
|
|
|
2018-04-13 10:46:03 +00:00
|
|
|
$expectedRes = Get-Content $testRoot$_\unitTest.expected.result
|
|
|
|
$generatedRes = Get-Content $testRoot$_\unitTest.result.json
|
|
|
|
|
|
|
|
if ($generatedRes -eq $expectedRes)
|
|
|
|
{
|
|
|
|
Remove-Item $testRoot$_\unitTest.result.json
|
2020-08-25 00:21:51 +00:00
|
|
|
"$dirName ... OK"
|
2018-04-13 10:46:03 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2020-08-25 00:21:51 +00:00
|
|
|
"$dirName ... KO"
|
|
|
|
""
|
|
|
|
"There's a (some) problem(s) in your functionList.xml"
|
2018-04-13 10:46:03 +00:00
|
|
|
exit -1
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
2020-08-25 00:21:51 +00:00
|
|
|
""
|
|
|
|
"All tests are passed."
|
2018-04-13 10:46:03 +00:00
|
|
|
exit 0
|