aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Muth <matthias.muth@gmx.de>2025-07-13 23:21:21 +0200
committerMatthias Muth <matthias.muth@gmx.de>2025-07-13 23:21:21 +0200
commitf3ca62d246ba010d1df53609b48173ec147cd74f (patch)
treeba1c3dec2823f0ab418e9e200da5dc72c3ecf05b
parentfc45c74abb6cfb205de80e52202989b2a4c99c13 (diff)
downloadperlweeklychallenge-club-f3ca62d246ba010d1df53609b48173ec147cd74f.tar.gz
perlweeklychallenge-club-f3ca62d246ba010d1df53609b48173ec147cd74f.tar.bz2
perlweeklychallenge-club-f3ca62d246ba010d1df53609b48173ec147cd74f.zip
Challenge 329 Task 1 and 2 solutions in Perl by Matthias Muth - Update
-rwxr-xr-xchallenge-329/matthias-muth/perl/ch-2.pl7
1 files changed, 7 insertions, 0 deletions
diff --git a/challenge-329/matthias-muth/perl/ch-2.pl b/challenge-329/matthias-muth/perl/ch-2.pl
index bd1fd39713..fe55f2339e 100755
--- a/challenge-329/matthias-muth/perl/ch-2.pl
+++ b/challenge-329/matthias-muth/perl/ch-2.pl
@@ -40,5 +40,12 @@ is longest_nice_substring( "cC" ), "cC",
'Example 2: longest_nice_substring( "cC" ) == "cC"';
is longest_nice_substring( "A" ), "",
'Example 3: longest_nice_substring( "A" ) == ""';
+is longest_nice_substring( "XabcABCX" ), "abcABC",
+ 'Test 1: longest_nice_substring( "XabcABCX" ) == "abcABC"';
+is longest_nice_substring( "XaAbBcCX" ), "aAbBcC",
+ 'Test 2: longest_nice_substring( "XaAbBcCX" ) == "aAbBcC"';
+is longest_nice_substring( "notniceANOTNICEXniceNICEXaA" ), "niceNICE",
+ 'Test 3: longest_nice_substring( "notniceANOTNICEXniceNICEXaA" )'
+ . ' == "niceNICE"';
done_testing;