Test-More / Test2-Harness

Alternative to Test::Harness
Other
23 stars 26 forks source link

WIP Allow running a tainted runner #264

Open JRaspass opened 1 year ago

JRaspass commented 1 year ago

STILL WIP. DO NOT MERGE

This allows tainted tests to benefit from the preload feature, fixes #262.

exodist commented 1 year ago

I am not bothered by the untaint, this proof of concept looks good. It will need a t/integration test that verifies it, as well as the cleanup and polish you already mentioned needing.

The one thing I would change about untaint() is that I would make it so that at load time it checks if taint mode is enabled, if it is then define sub untaint as you have, but if taint mode is not enabled just return the argument and skip the regex, as a minor performance enhancement when taint is not used.

The test is essential becaus eI will almost certainly break this feature without a test to save me from that. The test should skip on platforms/perls where taint mode is not available.