diff options
| -rw-r--r-- | challenge-063/brtastic/perl/ch-1.pl | 16 | ||||
| -rw-r--r-- | challenge-063/brtastic/perl/ch-2.pl | 24 |
2 files changed, 20 insertions, 20 deletions
diff --git a/challenge-063/brtastic/perl/ch-1.pl b/challenge-063/brtastic/perl/ch-1.pl index 3561f416d4..a0cc90e27a 100644 --- a/challenge-063/brtastic/perl/ch-1.pl +++ b/challenge-063/brtastic/perl/ch-1.pl @@ -13,11 +13,11 @@ sub last_word return; } -# use Test::More; -# -# is last_word(' hello world', qr/[ea]l/), 'hello'; # 'hello' -# is last_word("Don't match too much, Chet!", qr/ch.t/i), 'Chet!'; # 'Chet!' -# ok !defined last_word("spaces in regexp won't match", qr/in re/); # undef -# is last_word( join(' ', 1..1e6), qr/^(3.*?){3}/), '399933'; # '399933' -# -# done_testing; +use Test::More; + +is last_word(' hello world', qr/[ea]l/), 'hello'; # 'hello' +is last_word("Don't match too much, Chet!", qr/ch.t/i), 'Chet!'; # 'Chet!' +ok !defined last_word("spaces in regexp won't match", qr/in re/); # undef +is last_word( join(' ', 1..1e6), qr/^(3.*?){3}/), '399933'; # '399933' + +done_testing; diff --git a/challenge-063/brtastic/perl/ch-2.pl b/challenge-063/brtastic/perl/ch-2.pl index 8af25688ef..c934ed6bce 100644 --- a/challenge-063/brtastic/perl/ch-2.pl +++ b/challenge-063/brtastic/perl/ch-2.pl @@ -22,15 +22,15 @@ sub rotate_string } } -# use Test::More; -# -# is rotate_string('xy'), 3; -# is rotate_string('xyxx'), 7; -# is rotate_string('xxxx'), 1; -# is rotate_string('xyxy'), 3; -# is rotate_string('xxyy'), 7; -# is rotate_string('xxxxx'), 1; -# is rotate_string('xyyxx'), 4; -# is rotate_string('xyyxxyyyxxx'), 4; -# -# done_testing; +use Test::More; + +is rotate_string('xy'), 3; +is rotate_string('xyxx'), 7; +is rotate_string('xxxx'), 1; +is rotate_string('xyxy'), 3; +is rotate_string('xxyy'), 7; +is rotate_string('xxxxx'), 1; +is rotate_string('xyyxx'), 4; +is rotate_string('xyyxxyyyxxx'), 10; + +done_testing; |
