about summary refs log tree commit homepage
path: root/t/lei-mirror.t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-02-06 12:18:42 +0000
committerEric Wong <e@80x24.org>2021-02-07 03:34:32 +0000
commite591a7bfdd57884f187afbf2229f2834639a4489 (patch)
treef6800ab602dd51b51a0c653eadef4525cd70a271 /t/lei-mirror.t
parent5234287546c10ab543f83431da0dc2f2d8ce6d4e (diff)
downloadpublic-inbox-e591a7bfdd57884f187afbf2229f2834639a4489.tar.gz
Option combinations which make no sense should fail
to prevent misunderstandings and avoid surprises.
Diffstat (limited to 't/lei-mirror.t')
-rw-r--r--t/lei-mirror.t6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/lei-mirror.t b/t/lei-mirror.t
index cf34c7ae..6af49678 100644
--- a/t/lei-mirror.t
+++ b/t/lei-mirror.t
@@ -16,6 +16,12 @@ test_lei({ tmpdir => $tmpdir }, sub {
         my $t2 = "$home/t2-mirror";
         ok($lei->('add-external', $t2, '--mirror', "$http/t2/"), '--mirror v2');
         ok(-f "$t2/msgmap.sqlite3", 't2-mirror indexed');
+
+        ok(!$lei->('add-external', $t2, '--mirror', "$http/t2/"),
+                '--mirror fails if reused');
+
+        ok(!$lei->('add-external', "$t2-fail", '-Lmedium'), '--mirror v2');
+        ok(!-d "$t2-fail", 'destination not created on failure');
 });
 
 ok($td->kill, 'killed -httpd');