AnyEvent-FTP
view release on metacpan or search on metacpan
t/anyevent_ftp_server_context_memory__pwd.t view on Meta::CPAN
use Test2::V0 -no_srand => 1;
use autodie;
use Test::AnyEventFTPServer;
use Path::Class::Dir;
use AnyEvent::FTP::Server::Context::Memory;
my $t = create_ftpserver_ok('Memory');
my $context;
$t->on_connect(sub { $context = shift->context });
# force a connect
$t->command_ok('NOOP')
->code_is(200);
$t->command_ok('PWD')
->code_is(257)
->message_is('"/" is the current directory');
$context->cwd(Path::Class::Dir->new_foreign("Unix", '', qw( foo bar baz )));
$t->command_ok('PWD')
->code_is(257)
->message_is('"/foo/bar/baz" is the current directory');
done_testing;
( run in 0.764 second using v1.01-cache-2.11-cpan-39bf76dae61 )