Skip to content

Commit a10b026

Browse files
committed
Tests for the "files-are-the-same" sub.
1 parent 44e194a commit a10b026

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

t/unit-files-are-the-same.t

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env perl
2+
3+
use strict;
4+
use Test::More;
5+
use App::perlbrew;
6+
use FindBin qw($RealBin);
7+
8+
my @test_files = (<$RealBin/*.t>)[0..9];
9+
10+
for my $i (0..$#test_files) {
11+
my $t = $test_files[$i];
12+
my $u = $test_files[$i - 1];
13+
my $should_be_same = App::perlbrew::files_are_the_same($t, $t);
14+
my $should_not_be_same = App::perlbrew::files_are_the_same($t, $u);
15+
16+
ok $should_be_same;
17+
ok !$should_not_be_same;
18+
}
19+
20+
done_testing;

0 commit comments

Comments
 (0)