in reply to Re^2: Unit testing OS rich code
in thread Unit testing OS rich code
I would agree, if he was actually performing the file test:
sub file_exists { my ($filename) = @_; #return (-f $filename); return 1; }
But once he's mocked that up along with rename which can perform differently on different platforms, and touch, which may well not exist on many machines, all that's left is can perl: a) iterate a hash and b) take the correct branch in the if statement.
Which is a pointless exercise that serves only to achieve a "100% coverage" statistic. S'no wonder development gets ever more expensive while error rates remain constant.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Unit testing OS rich code
by chromatic (Archbishop) on Oct 13, 2011 at 00:20 UTC |