Skip to content

Commit

Permalink
Test mkdir on existing file
Browse files Browse the repository at this point in the history
  • Loading branch information
McSinyx committed Jun 17, 2021
1 parent fd078f9 commit 155f0fe
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion S32-io/mkdir_rmdir.t
Expand Up @@ -3,7 +3,7 @@ use Test;
use lib $?FILE.IO.parent(2).add("packages/Test-Helpers");
use Test::Util;

plan 5;
plan 6;

# Tests for IO::Path.mkdir and IO::Path.rmdir
#
Expand All @@ -16,6 +16,13 @@ plan 5;
ok $dir.d, "$dir is a directory";
}

# mkdir soft-fails when pathname exists and is not a directory.
{
my $file = make-temp-dir.add: "file";
spurt $file, "hello world";
fails-like { $file.mkdir }, X::IO::Mkdir;
}

# rmdir soft-fails when dir doesn't exist.
{
my $dir = make-temp-dir;
Expand Down

0 comments on commit 155f0fe

Please sign in to comment.