in reply to Testing Random Code
BTW - your test case would allow newlines after the digits.use Test::More qw(no_plan); my @items = map {pin()} 1..1000; my @bad = grep { ! /\A\d{4}\z/ } @items; is_deeply(\@bad,[],"All pins are 4 digits");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Testing Random Code
by Ovid (Cardinal) on Sep 19, 2006 at 11:19 UTC | |
by imp (Priest) on Sep 19, 2006 at 11:52 UTC | |
by Ovid (Cardinal) on Sep 19, 2006 at 12:20 UTC | |
by jwkrahn (Abbot) on Sep 19, 2006 at 14:32 UTC |