Unit-tests for function-list

Close #8757, close #8762
This commit is contained in:
Don HO 2020-08-25 02:21:51 +02:00
parent a1a8b1354f
commit 34357a46cf
5 changed files with 12 additions and 27 deletions

View File

@ -1 +1 @@
{"leaves":["setenv","action_needed","canonicalize_path","make_module","db2_name","versioned_copy"],"root":"unitTest"}
{"leaves":["action_needed","canonicalize_path","make_module","db2_name","versioned_copy"],"root":"unitTest"}

View File

@ -0,0 +1 @@
{"leaves":["setenv","action_needed","canonicalize_path","make_module","db2_name","versioned_copy"],"root":"unitTest"}

View File

@ -1,47 +1,31 @@
..\..\bin\notepad++.exe -export=functionList -lasm .\asm\unitTest | Out-Null
..\..\bin\notepad++.exe -export=functionList -lautoit .\autoit\unitTest | Out-Null
..\..\bin\notepad++.exe -export=functionList -lbash .\bash\unitTest | Out-Null
..\..\bin\notepad++.exe -export=functionList -lbatch .\batch\unitTest | Out-Null
..\..\bin\notepad++.exe -export=functionList -lc .\c\unitTest | Out-Null
..\..\bin\notepad++.exe -export=functionList -lcpp .\cpp\unitTest | Out-Null
..\..\bin\notepad++.exe -export=functionList -lcs .\cs\unitTest | Out-Null
..\..\bin\notepad++.exe -export=functionList -lini .\ini\unitTest | Out-Null
..\..\bin\notepad++.exe -export=functionList -linno .\inno\unitTest | Out-Null
..\..\bin\notepad++.exe -export=functionList -ljava .\java\unitTest | Out-Null
..\..\bin\notepad++.exe -export=functionList -ljavascript .\javascript\unitTest | Out-Null
..\..\bin\notepad++.exe -export=functionList -lnsis .\nsis\unitTest | Out-Null
..\..\bin\notepad++.exe -export=functionList -lperl .\perl\unitTest | Out-Null
..\..\bin\notepad++.exe -export=functionList -lphp .\php\unitTest | Out-Null
..\..\bin\notepad++.exe -export=functionList -lpowershell .\powershell\unitTest | Out-Null
..\..\bin\notepad++.exe -export=functionList -lpython .\python\unitTest | Out-Null
..\..\bin\notepad++.exe -export=functionList -lruby .\ruby\unitTest | Out-Null
..\..\bin\notepad++.exe -export=functionList -lvhdl .\vhdl\unitTest | Out-Null
..\..\bin\notepad++.exe -export=functionList -lxml .\xml\unitTest | Out-Null
$testRoot = ".\"
Get-ChildItem $testRoot -Filter *.* |
Foreach-Object {
if ((Get-Item $testRoot$_) -is [System.IO.DirectoryInfo])
{
{
$dirName = (Get-Item $testRoot$_).Name
..\..\bin\notepad++.exe -export=functionList -l"$dirName" $testRoot$_\unitTest | Out-Null
$expectedRes = Get-Content $testRoot$_\unitTest.expected.result
$generatedRes = Get-Content $testRoot$_\unitTest.result.json
if ($generatedRes -eq $expectedRes)
{
Remove-Item $testRoot$_\unitTest.result.json
""
"OK"
"$dirName ... OK"
}
else
{
"$generatedRes"
"$dirName ... KO"
""
"There's a (some) problem(s) in your functionList.xml"
exit -1
}
}
}
""
"All tests are passed."
exit 0