X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fperl_execute.t;h=2e95bf4b3ed52e678ff6861aa8fe585db9f7ccea;hb=82d78e8964ee937e837fc21acd06fcb7f9701d6a;hp=3792db42e7d8fb9c0b446350c589986eae8172d5;hpb=5ccce2d5c1fb651f83c73c811069003e4a591a53;p=scpubgit%2FObject-Remote.git diff --git a/t/perl_execute.t b/t/perl_execute.t index 3792db4..2e95bf4 100644 --- a/t/perl_execute.t +++ b/t/perl_execute.t @@ -3,12 +3,16 @@ use Test::More; $ENV{OBJECT_REMOTE_TEST_LOGGER} = 1; -use Object::Remote::Connector::Local; -use Object::Remote::Connector::SSH; +use Object::Remote::Connector::Local; +use Object::Remote::Connector::SSH; my $defaults = Object::Remote::Connector::Local->new; my $normal = $defaults->final_perl_command; my $ssh = Object::Remote::Connector::SSH->new(ssh_to => 'testhost')->final_perl_command; +my $with_env = do { + local $ENV{OBJECT_REMOTE_PERL_BIN} = 'perl_bin_test_value'; + Object::Remote::Connector::Local->new->final_perl_command; +}; is($defaults->timeout, 10, 'Default connection timeout value is correct'); is($defaults->watchdog_timeout, undef, 'Watchdog is not enabled by default'); @@ -16,6 +20,7 @@ is($defaults->stderr, undef, 'Child process STDERR is clone of parent process ST is_deeply($normal, ['perl', '-'], 'Default Perl interpreter arguments correct'); is_deeply($ssh, [qw(ssh -A testhost), "perl -"], "Arguments using ssh are correct"); +is_deeply($with_env, ['perl_bin_test_value', '-'], "Respects OBJECT_REMOTE_PERL_BIN env value"); -done_testing; +done_testing;