AnyEvent-Filesys-Watcher

 view release on metacpan or  search on metacpan

t/20-scanFilesystem.t  view on Meta::CPAN

use Test::More;

use strict;
use warnings;

use Data::Dump;

use AnyEvent::Filesys::Watcher;
use lib 't/lib';
use TestSupport qw(create_test_files delete_test_files move_test_files
	modify_attrs_on_test_files);

# Setup for tests
create_test_files qw(1 one/1 two/1);

my $dir = $TestSupport::dir;

my $watcher = AnyEvent::Filesys::Watcher->new(
	directories => ["$dir/one"],

t/21-scanFilesystemLinks.t  view on Meta::CPAN

use strict;
use warnings;

use Test::More;
use Data::Dump qw(ddx);

use AnyEvent::Filesys::Watcher;
use lib 't/lib';
use TestSupport qw(create_test_files delete_test_files);

# Tests for RT#72849

my $dir = $TestSupport::dir;

plan skip_all => 'symlink not implemented on Win32' if $^O eq 'MSWin32';

# Setup for test by creating a broken symlink
create_test_files 'original';

t/30-event.t  view on Meta::CPAN

use strict;
use warnings;

use Test::More;
use File::Spec;

use lib 't/lib';
use TestSupport qw(create_test_files delete_test_files move_test_files
	modify_attrs_on_test_files test EXISTS DELETED);

$|++;

if ($^O eq 'MSWin32' ) {
	plan skip_all => 'Test temporarily disabled for MSWin32';
}

# ls: +foo +bar +baz

t/31-notify-fallback.t  view on Meta::CPAN

use strict;
use warnings;

use Test::More;
use File::Spec;

use lib 't/lib';
use TestSupport qw(create_test_files delete_test_files move_test_files
	modify_attrs_on_test_files test EXISTS DELETED);

$|++;

# ls: +foo +bar +baz
test(
	setup => sub { create_test_files(qw(foo bar baz)) },
	description => 'create three files',
	expected => {

t/32-filter.t  view on Meta::CPAN

use strict;
use warnings;

use Test::More;
use File::Spec;

use lib 't/lib';
use TestSupport qw(create_test_files delete_test_files move_test_files
	modify_attrs_on_test_files test EXISTS DELETED);

$|++;

# Filters can only be tested with the fallback backend.  The other backends
# may merge events and that make it hard to synchronize.

test(
	setup => sub { create_test_files(qw(foo ignoreme)) },

t/33-specify-kqueue.t  view on Meta::CPAN

use strict;
use warnings;

use Test::More;
use File::Spec;

use lib 't/lib';
use TestSupport qw(create_test_files delete_test_files move_test_files
	modify_attrs_on_test_files test EXISTS DELETED);

$|++;

unless ($^O eq 'darwin' and eval { require IO::KQueue; 1; }) {
	plan skip_all => 'Test only on Mac with IO::KQueue';
}

# ls: +foo +bar +baz

t/34-raw-events.t  view on Meta::CPAN

use strict;
use warnings;

use Test::More;

use AnyEvent;
use AnyEvent::Filesys::Watcher;
use lib 't/lib';
use TestSupport qw(create_test_files delete_test_files);

if ($^O eq 'MSWin32' ) {
	plan skip_all => 'Test temporarily disabled for MSWin32';
}

$|++;

sub run_test {
	my %extra_config = @_;

t/41-bug-modified-in-cb.t  view on Meta::CPAN

use strict;
use warnings;

use Test::More;

use AnyEvent;
use AnyEvent::Filesys::Watcher;
use lib 't/lib';
use TestSupport qw(create_test_files delete_test_files);

if ($^O eq 'MSWin32' ) {
	plan skip_all => 'Test temporarily disabled for MSWin32';
}

$|++;

sub run_test {
	my %extra_config = @_;

t/42-inotify-race.t  view on Meta::CPAN

# Previous implementation had a race condition which could miss entities
# created inside a newly create directory.

use strict;
use warnings;

use File::Spec;
use Test::More;

use AnyEvent::Filesys::Watcher;
use lib 't/lib';
use TestSupport qw(create_test_files delete_test_files move_test_files
	modify_attrs_on_test_files test EXISTS DELETED);

if ($^O eq 'MSWin32' ) {
	plan skip_all => 'Test temporarily disabled for MSWin32';
}

$|++;

test(



( run in 0.395 second using v1.01-cache-2.11-cpan-87723dcf8b7 )