Closed Gianfrancoalongi closed 11 years ago
The problem is that, although the function is correctly pinpointed
Conf.cover ← ⊂ '#.UTFile.plus_function'
Once the file is loaded, the namespace will be embedded within the UT namespace. Therefore, the namespace the functions are in, will be #.UT.UTFile.plus_function This only happens for file execution.
The ⎕CR of functions to be covered has not been affected, since the File to test on has previously (and still is) loaded into the workspace before testing.
Thus, #.UTFile exists, alongisde #.UT And so, the framework can ⎕CR #.UTFile.plus_function but, it is #.UT.UTFile that is executed.
Morten Kromberg suggests that the ‘-target’ modifier, could possibly be a solution to this problem.
⎕SE.SALT.Load '/blah/blah/UT -target=#'
… will always put the namespace in #.UT, even if you are in some other space at the time.
Actually, this could work fine. Seems to fit the bill.
Fixed!
It is currently not possible to cover functions in a file when running the file-path version of unit test execution.
Conf ← ⎕NEW UTcover Conf.pages ← '/home/APL/coverage' Conf.cover ← ⊂ '#.UTFile.plus_function' Conf UT.run '/path/to/file/File.dyalog'
Will not cover the plus_function in the UTFile NameSpace in the file File.dyalog.