about summary refs log tree commit homepage
path: root/t/lei_xsearch.t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-08-11 11:26:18 +0000
committerEric Wong <e@80x24.org>2021-08-11 21:50:09 +0000
commit5634e8331cb8782944a258a12e1f9857dfb1c8e1 (patch)
treea93419e9ad7690e246928910cab6b39bb471a84a /t/lei_xsearch.t
parentd15e80db44399867d8ca53528e38f70f54562b88 (diff)
downloadpublic-inbox-5634e8331cb8782944a258a12e1f9857dfb1c8e1.tar.gz
As documented, File::Spec->canonpath does not canonicalize
"/../".  While we want to do our best to preserve symlinks in
pathnames, leaving "/../" can mislead our inotify|kqueue usage.
Diffstat (limited to 't/lei_xsearch.t')
-rw-r--r--t/lei_xsearch.t8
1 files changed, 5 insertions, 3 deletions
diff --git a/t/lei_xsearch.t b/t/lei_xsearch.t
index 3eb44233..d9ddb297 100644
--- a/t/lei_xsearch.t
+++ b/t/lei_xsearch.t
@@ -11,6 +11,7 @@ require PublicInbox::ExtSearchIdx;
 require_git 2.6;
 require_ok 'PublicInbox::LeiXSearch';
 require_ok 'PublicInbox::LeiALE';
+require_ok 'PublicInbox::LEI';
 my ($home, $for_destroy) = tmpdir();
 my @ibx;
 for my $V (1..2) {
@@ -88,18 +89,19 @@ is($lxs->over, undef, '->over fails');
         my $smsg = $lxs->smsg_for($mitem) or BAIL_OUT 'smsg_for broken';
 
         my $ale = PublicInbox::LeiALE::_new("$home/ale");
-        $ale->refresh_externals($lxs);
+        my $lei = bless {}, 'PublicInbox::LEI';
+        $ale->refresh_externals($lxs, $lei);
         my $exp = [ $smsg->{blob}, 'blob', -s 't/utf8.eml' ];
         is_deeply([ $ale->git->check($smsg->{blob}) ], $exp, 'ale->git->check');
 
         $lxs = PublicInbox::LeiXSearch->new;
         $lxs->prepare_external($v2ibx);
-        $ale->refresh_externals($lxs);
+        $ale->refresh_externals($lxs, $lei);
         is_deeply([ $ale->git->check($smsg->{blob}) ], $exp,
                         'ale->git->check remembered inactive external');
 
         rename("$home/v1tmp", "$home/v1moved") or BAIL_OUT "rename: $!";
-        $ale->refresh_externals($lxs);
+        $ale->refresh_externals($lxs, $lei);
         is($ale->git->check($smsg->{blob}), undef,
                         'missing after directory gone');
 }