aboutsummaryrefslogtreecommitdiff
path: root/challenge-012/paulo-custodio/test.pl
diff options
context:
space:
mode:
Diffstat (limited to 'challenge-012/paulo-custodio/test.pl')
-rw-r--r--challenge-012/paulo-custodio/test.pl39
1 files changed, 3 insertions, 36 deletions
diff --git a/challenge-012/paulo-custodio/test.pl b/challenge-012/paulo-custodio/test.pl
index db440a3a8f..ba6c37260b 100644
--- a/challenge-012/paulo-custodio/test.pl
+++ b/challenge-012/paulo-custodio/test.pl
@@ -1,37 +1,4 @@
-#!/usr/bin/perl
-
-use strict;
-use warnings;
-use 5.030;
+#!/usr/bin/env perl
+use Modern::Perl;
use Test::More;
-
-is capture("perl perl/ch-1.pl"), "30031\n";
-
-is capture("perl perl/ch-2.pl / ".
- " /a/b/c/d ".
- " /a/b/cd ".
- " /a/b/cc ".
- " /a/b/c/d/e "), "/a/b\n";
-
-is capture("perl perl/ch-2.pl : ".
- " :a:b:c:d ".
- " :a:b:cd ".
- " :a:b:cc ".
- " :a:b:c:d:e "), ":a:b\n";
-
-is capture("perl perl/ch-2.pl / ".
- " /b/c/d ".
- " /a/b/c/d ".
- " /a/b/cd ".
- " /a/b/cc ".
- " /a/b/c/d/e "), "\n";
-
-done_testing;
-
-
-sub capture {
- my($cmd) = @_;
- my $out = `$cmd`;
- $out =~ s/[ \r\t]*\n/\n/g;
- return $out;
-}
+require '../../challenge-001/paulo-custodio/test.pl';