From: Simon McVittie <smcv@debian.org>
Date: Mon, 18 Jan 2016 09:21:07 +0000 (+0000)
Subject: img test: use the right filenames when testing that deletion occurs
X-Git-Tag: 3.20160121~12
X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/b0627aef10e3b5cf71f089aa4d586326b99bcc91?ds=inline;hp=--cc

img test: use the right filenames when testing that deletion occurs

Also use a less misleading name for the sample SVG: it is no longer empty.
Since commit 105f285a it has contained a blue square.
---

b0627aef10e3b5cf71f089aa4d586326b99bcc91
diff --git a/debian/changelog b/debian/changelog
index dc2fe2f06..71a1b0e45 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -37,6 +37,7 @@ ikiwiki (3.20150615) UNRELEASED; urgency=medium
   * Silence "used only once: possible typo" warnings for variables
     that are part of modules' APIs
   * img test: skip testing PDFs if unsupported
+  * img test: use the right filenames when testing that deletion occurs
 
  -- Simon McVittie <smcv@debian.org>  Mon, 15 Jun 2015 18:13:23 +0100
 
diff --git a/t/img.t b/t/img.t
index 0fceebeb8..b73988b7c 100755
--- a/t/img.t
+++ b/t/img.t
@@ -51,7 +51,7 @@ ok(! system("cp t/img/redsquare.png t/tmp/in/a:b:c:d.png"));
 ok(! system("cp t/img/redsquare.png t/tmp/in/a:b:c:d:e:f:g:h:i:j.png"));
 
 if ($SVGS_WORK) {
-	writefile("emptysquare.svg", "t/tmp/in",
+	writefile("bluesquare.svg", "t/tmp/in",
 		'<svg width="30" height="30"><rect x="0" y="0" width="30" height="30" fill="blue"/></svg>');
 }
 
@@ -60,7 +60,7 @@ ok(! system("cp t/img/twopages.pdf t/tmp/in/twopages.pdf"));
 
 my $maybe_svg_img = "";
 if ($SVGS_WORK) {
-	$maybe_svg_img = "[[!img emptysquare.svg size=10x]]";
+	$maybe_svg_img = "[[!img bluesquare.svg size=10x]]";
 }
 
 my $maybe_pdf_img = "";
@@ -129,10 +129,10 @@ if (1) { # for easier testing
 
 	ok(! system(@command, "--refresh"));
 
-	ok(! -e "$outpath/10x-simple.png");
-	ok(! -e "$outpath/10x-simple-svg.png");
-	ok(! -e "$outpath/10x-simple-pdf.png");
-	ok(! -e "$outpath/10x-p1-simple-pdf.png");
+	ok(! -e "$outpath/10x-redsquare.png");
+	ok(! -e "$outpath/10x-bluesquare.png");
+	ok(! -e "$outpath/12x-twopages.png");
+	ok(! -e "$outpath/16x-p1-twopages.png");
 	ok(! -e "$outpath/x8-hello:world.png");
 	ok(! -e "$outpath/x4-a:b:c.png");
 	ok(! -e "$outpath/x6-a:b:c:d:e:f:g:h:i:j.png");