I've just found a bug in my module. The bug results in an inappropriate infinite loop.
Before I fix the bug, I want to write up a test case. I can reproduce the bug OK, but if I put that code into the module tests, and the bug isn't fixed, or comes back for some reason, then the test program will go into an infinite loop. The test harness doesn't seem to notice that. I don't want to go sticking code into my test files that might cause an infinite loop and hang up the test harness or the entire system. If the module were for Unix only, I would stick an 'alarm 10' at the top of the test program. I'm told this won't work under Win32. What's the right way to handle this?