Skip to content

Commit

Permalink
Only run watch_path tests as subtest on OS X
Browse files Browse the repository at this point in the history
Please add more or less reliable tests for your flavour of OS
  • Loading branch information
lizmat committed May 28, 2014
1 parent 0f1f2cd commit b103fcb
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions S17-supply/watch_path.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 23;
plan 2;

my $forawhile = 1;
my $filename = "watch_path_checker";
Expand All @@ -11,8 +11,19 @@ END { unlink $filename if $filename } # make sure we cleanup
unlink $filename; # in case we missed the cleanup
ok !$filename.IO.e, "make sure we don't have a file";

given $*DISTRO.name {
when "macosx" {
#?rakudo.jvm skip "file system events NYI?"
{
subtest &macosx, "does watch_path work on Mac OS X";
}
default {
pass "Nothing reliable to test yet";
}
}

#==== specific tests from here
sub macosx {
plan 22;
my $s = IO::Notification.watch_path('.').grep({.path eq $filename}).uniq,
'only about our file';
ok $s ~~ Supply, 'Did we get a Supply?';
Expand Down

0 comments on commit b103fcb

Please sign in to comment.