Skip to content

Commit 95d68a2

Browse files
committed
[io grant] Test IO::Path.gist does escapes of backslashes
Rakudo impl: rakudo/rakudo@475d9bcf9b
1 parent fd308be commit 95d68a2

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

S32-io/io-path.t

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use lib <t/spec/packages/>;
33
use Test;
44
use Test::Util;
55

6-
plan 31;
6+
plan 32;
77

88
# L<S32::IO/IO::Path>
99

@@ -241,3 +241,16 @@ subtest '.sibling' => {
241241
is-path IO::Path::Win32.new('C:/').sibling('bar'),
242242
IO::Path::Win32.new('C:/bar'), '"C:/" with IO::Path::Win32';
243243
}
244+
245+
subtest '.gist escapes backslashes' => {
246+
plan 2 * @Path-Types;
247+
248+
for @Path-Types -> $Type {
249+
my $p = $Type.new: foo\bar\ber;
250+
is $p.gist.perl.EVAL, $p.gist, "relative path ($Type.perl())";
251+
252+
$p = $Type.new: $p.absolute;
253+
$p.is-absolute; # set internal `is-absolute` attr, if impl uses one
254+
is $p.gist.perl.EVAL, $p.gist, "absolute path ($Type.perl())";
255+
}
256+
}

0 commit comments

Comments
 (0)