aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrtastic <brtastic.dev@gmail.com>2020-06-01 23:25:35 +0200
committerbrtastic <brtastic.dev@gmail.com>2020-06-01 23:25:35 +0200
commitd16853c4fc2787f99a4ae182b558edfdc1608753 (patch)
treedf8b4b43190ec70c5f9e15fe31864d7bef6e72e7
parentfbbe8919f0859badcecb909838a8c221a34c90ba (diff)
downloadperlweeklychallenge-club-d16853c4fc2787f99a4ae182b558edfdc1608753.tar.gz
perlweeklychallenge-club-d16853c4fc2787f99a4ae182b558edfdc1608753.tar.bz2
perlweeklychallenge-club-d16853c4fc2787f99a4ae182b558edfdc1608753.zip
Uncomment & fix the tests
-rw-r--r--challenge-063/brtastic/perl/ch-1.pl16
-rw-r--r--challenge-063/brtastic/perl/ch-2.pl24
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;