]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/lei-externals.t
tests: restore CWD with "lei -C" and run_script
[public-inbox.git] / t / lei-externals.t
index 2291dd992b619ee3a08ec3a9cbbac105b4872dd7..16241e02c30d18e35a2a70829a4aad5ddc5ebf87 100644 (file)
@@ -4,7 +4,6 @@
 use strict; use v5.10.1; use PublicInbox::TestCommon;
 use Fcntl qw(SEEK_SET);
 use PublicInbox::Spawn qw(which);
-use PublicInbox::OnDestroy;
 require_git 2.6;
 require_mods(qw(json DBD::SQLite Search::Xapian));
 use POSIX qw(WTERMSIG WIFSIGNALED SIGPIPE);
@@ -266,10 +265,6 @@ test_lei(sub {
        {
                skip 'TEST_LEI_DAEMON_PERSIST_DIR in use', 1 if
                                        $ENV{TEST_LEI_DAEMON_PERSIST_DIR};
-               opendir my $dh, '.' or BAIL_OUT "opendir(.) $!";
-               my $od = PublicInbox::OnDestroy->new($$, sub {
-                       chdir $dh or BAIL_OUT "chdir: $!"
-               });
                my @q = qw(q -o mboxcl2:rel.mboxcl2 bye);
                lei_ok('-C', $home, @q);
                is(unlink("$home/rel.mboxcl2"), 1, '-C works before q');