Conversation
- add parsers for ADA, AutoHotKey, Fortran Fixed and Free Form style (see Community Topics notepad-plus-plus#11059 & notepad-plus-plus#13553), Haskell (see Community Topic notepad-plus-plus#12972), Haskell Literate style, Haskell Literate style for LaTeX, MOX (see Community Topic notepad-plus-plus#13675), PL/SQL (see Community Topic notepad-plus-plus#13393), RAPID (see Community Topics notepad-plus-plus#10725 & notepad-plus-plus#12264) - update comment for parsers Assembly, AutoIt3, Batch, C, Java, KRL, NSIS, PowerShell and Sinumerik - update language ID table - improve the Bash parser for single-line, "Here Document" (type 1 & 2) and "Here String" comments - improve the INI parser by using \xnn notation for special characters - improve the Inno Setup parser by searching for procedures in addition to functions, discards forward declarations and searches in INI, ISPP and ISSI sections - improve the UniVerse BASIC parser by searching for functions and procedures in addition to numeric and alpha-numeric labels - improve the XML parser for matching left and right quotes of function name filter
|
@MAPJe71 Thank you for your contribution. Have you any idea for building such system ? |
|
Hi @donho , I've been contemplating about unit tests myself. My idea for Function List automated tests involves the Test Anything Protocol and Lua scripts using the standalone interpreter and/or the LuaScript plugin.
The expected list needs to be "connected" to its source file, these could be separate files but I prefer one file as not to loose their connection e.g. as comment in the source file (for example 1) or as part of the script (for example 2). Do you already use some test system for (other parts of) Notepad++ or have any ideas? |
|
It seems that it could take some time until all these function list parsers have been tested. I wrote a parser for Pascal/Delphi and I would like to share it with the community. What would be better?
|
|
@MAPJe71 The unit test system I use in my job (forget its name) needs to export all methods to test, each method will be compiled to a exe. They'll be launched after compiling to generate the result for comparing. |
|
@MAPJe71 I'm trying to make function list unit test happen, here is the first draft of interface: What do you think? |
|
@donho
ad.5. my preference 😄 |
By "export", do you mean write the strings into a file? The approach that I suggested could be done without installation any script, that allows anyone test his/her RE very easily (for example, for user languages).
I'll consider this point.
we need LangID still - the file extension could be used for several languages |
Yes, though I just realized we'd have to decide on a file format too e.g. XML (as already used within N++), JSON, YAML.
They could also easily compare the exported file with an expected result file using any diff/compare tool. The files would preferably have the same fileformat though.
Good point, agreed.
Do you have a preference for a scripting language or maybe a preference which not to use? |
|
@MAPJe71 Exported file could be JSON, however it'll be in the first implementation. the behaviour:
Not yet. What is your suggestion? |
Wouldn't it make more sense to have the file extension of the result/export file reflect the used file format? or to also reflect the command line parameter
The ones that come to mind are JavaScript, Lua, Perl, PowerShell, Python and VBScript. My first choice was Python, my second Lua. But then I remembered AutoHotkey and AutoIt. They support automated GUI testing out of the box which might be handy. Needs more research. But whatever the language I'd probably end up using some Command Shell scripts (i.e. batch files) too. AutoHotkey
AutoIt
JavaScript
KiXtart
Lua
Perl
PowerShell
Python
VBScript
Edit: added KiXtart, AutoIt and AutoHotkey. |
Indeed, it'll be: Thank you @MAPJe71 for these very detailled comparisons. I'll think about it. @milipili I do remember that you told me that Unit test will be part of nany. What is its status? Is it usable immediately? (It's about comparing 2 result files, for the moment) |
|
@MAPJe71 |
It appears that only the leaves of the tree are exported. |
donho
left a comment
There was a problem hiding this comment.
Built unit test for Functionlist by using its new export feature.
Once it's done, we can make sure this PR's change won't bring any regression.
|
It would be nice if you also would include #3663, the missing Pascal/Delphi parser. |
|
@MAPJe71 I'm exporting functionList in JSON. |
|
@dinkumoil {
"root":"lesDlgs.cpp",
"branches":[
{
"name":"ValueDlg",
"leaves":[
"init",
"doDialog",
"reSizeValueBox",
"run_dlgProc"
]
},
{
"name":"ButtonDlg",
"leaves":[
"doDialog",
"run_dlgProc"
]
}
],
"leaves":[
"func1",
"func2"
]
} |
|
Thank you @MAPJe71 |
|
@donho |
|
@MAPJe71 FYI (if you didn't chech the latest commits): function list export feature has been enhanced - in json format now. |
|
For optimizations and regression checks an output of the parser timing could help to identify problematic parsers. |
|
@MAPJe71 Just wanna know the progression of unit test for function list? |
|
@donho
What do I have:
Todo:
|
|
@GitMensch Currently Notepad++ is capable to get input source file and output a result in JSON format. |
|
@donho that's very good news. Please drop a note when you're finished and I'll see how to add it to appveyor (other CI's are possible of course, too - but as long as this project is MS centered in its core it is likely best left there). |
|
@MAPJe71 |
- added missing unittest for c - added further function lists for ada, fortran, fortran77, haskell from previous PR of MAPJe71_functionlist_update3 - added simple rust function list - unittest files from the internet probably no complex ones - added to installer Fix notepad-plus-plus#9698, close notepad-plus-plus#3393, close notepad-plus-plus#9727


Uh oh!
There was an error while loading. Please reload this page.