+
+ my %phail = (
+ HTTPS => 'https://public-inbox.org/' . 'phail',
+ ONION => 'http://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/' . 'phail,'
+ );
+ for my $t (qw(HTTPS ONION)) {
+ SKIP: {
+ my $k = "TEST_LEI_EXTERNAL_$t";
+ $ENV{$k} or skip "$k unset", 1;
+ my $url = $phail{$t};
+ my $dir = "phail-$t";
+ ok(!lei(qw(add-external -Lmedium --mirror),
+ $url, $dir), '--mirror non-existent v2');
+ is($? >> 8, 22, 'curl 404');
+ ok(!-d $dir, 'directory not created');
+ unlike($lei_err, qr/# mirrored/, 'no success message');
+ } # SKIP
+ } # for