in reply to Re^7: How to write testable command line script?
in thread How to write testable command line script?
I am trying to clear an array via assignment in the test file that is already defined in the script file. It appears that command line usage differs from how the subroutine is called in the test environment.
On the command line, once the subroutine prints the results and exits, the variables are cleared, so when I enter another expression manually, things work. With the test environment, those values do not get cleared, but remain in the @answer array, and appear to be causing the failure.
There might be other problems causing the failure too, but the @answer array should have 3 or fewer values in it when running any tests.
What I thought was going to be a rather simple problem turned out to be much more involved than I thought.
|
|---|