Menu

#6 test functions starting with a '.'

open
nobody
None
5
2011-11-04
2011-11-04
flodel81
No

Hello. I do not think the testFuncRegexp argument of the defineTestSuite allows for test functions starting with a '.'
... or I may not be using the regex correctly, please excuse me if it is the case.

I suppose the files matching testFileRegexp are sourced locally and functions matching testFuncRegexp searched for within ls() when it might use ls(all.names = TRUE)

Why do I need a dot in front of my test functions one may ask. I like to create library files that contain both functions and their unit test functions. When an end user sources this file, I find it nice that all test functions are "hidden" since ls() does not show variables starting with a dot by default.

In advance thank you for looking into my request.
Florent.

Discussion


Log in to post a comment.