Skip to content

Commit fedf27b

Browse files
committed
Initial testing on CompUnitRepo::Local::File
1 parent b3fdfeb commit fedf27b

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

S22-package-format/local.t

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
use v6;
2+
use Test;
3+
4+
plan 11;
5+
6+
chdir 't/spec/S22-package-format';
7+
my $cwd = $*CWD;
8+
9+
my $curlf1 = CompUnitRepo::Local::File.new(".");
10+
isa_ok $curlf1, CompUnitRepo::Local::File;
11+
isa_ok $curlf1.path, IO::Path;
12+
is $curlf1.path, $cwd, 'is . looking at the right directory';
13+
is $curlf1.short-id, 'file', 'is the short-id right';
14+
dies_ok { $curlf1.install( "foo" ) }, 'Cannot install on CUR::File';
15+
16+
my $curlf2 = CompUnitRepo::Local::File.new(".");
17+
isa_ok $curlf2, CompUnitRepo::Local::File;
18+
ok $curlf1 === $curlf2, 'are they the same';
19+
20+
my $curlf3 = CompUnitRepo::Local::File.new("local");
21+
isa_ok $curlf3, CompUnitRepo::Local::File;
22+
ok $curlf2 !=== $curlf3, 'are they different';
23+
isa_ok $curlf3.path, IO::Path;
24+
is $curlf3.path, IO::Path.new("$cwd/local"), 'is "local" looking at the right dir';
25+
26+
say $curlf3.candidates('Shazbat');
27+
28+
say $*CWD;

S22-package-format/local/Shazbat.pm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
class Shazbat {
2+
}

0 commit comments

Comments
 (0)