Browse Source

Unit-tests for function-list

Close #8757, close #8762
pull/8769/head
Don HO 4 years ago
parent
commit
34357a46cf
  1. 2
      PowerEditor/Test/FunctionList/bash/unitTest.expected.result
  2. 1
      PowerEditor/Test/FunctionList/bash/unitTest.expected.result.correct
  3. 36
      PowerEditor/Test/FunctionList/unitTestLauncher.ps1
  4. 0
      PowerEditor/Test/FunctionList/vhdl/unitTest
  5. 0
      PowerEditor/Test/FunctionList/vhdl/unitTest.expected.result

2
PowerEditor/Test/FunctionList/bash/unitTest.expected.result

@ -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"}

1
PowerEditor/Test/FunctionList/bash/unitTest.expected.result.correct

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

36
PowerEditor/Test/FunctionList/unitTestLauncher.ps1

@ -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

0
PowerEditor/Test/FunctionList/VHDL/unitTest → PowerEditor/Test/FunctionList/vhdl/unitTest

0
PowerEditor/Test/FunctionList/VHDL/unitTest.expected.result → PowerEditor/Test/FunctionList/vhdl/unitTest.expected.result

Loading…
Cancel
Save