X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/ad8cb6d6fafa77be4e97a983d1b209f79aaf65ac..a2bda4b6af44e01db5f4761926318c94974cb45c:/t/conflicts.t

diff --git a/t/conflicts.t b/t/conflicts.t
index d7e04d3ae..ef183c6b6 100755
--- a/t/conflicts.t
+++ b/t/conflicts.t
@@ -2,17 +2,33 @@
 # Tests for bugs relating to conflicting files in the srcdir
 use warnings;
 use strict;
-use Test::More tests => 106;
+use Cwd qw(getcwd);
+use Test::More;
+
+my $installed = $ENV{INSTALLED_TESTS};
+
+my @command;
+if ($installed) {
+	ok(1, "running installed");
+	@command = qw(ikiwiki);
+}
+else {
+	ok(! system("make -s ikiwiki.out"));
+	@command = ("perl", "-I".getcwd, qw(./ikiwiki.out
+		--underlaydir=underlays/basewiki
+		--set underlaydirbase=underlays
+		--templatedir=templates));
+}
 
 # setup
 my $srcdir="t/tmp/src";
 my $destdir="t/tmp/dest";
-ok(! system("make -s ikiwiki.out"));
 
 # runs ikiwiki to build test site
 sub runiki {
 	my $testdesc=shift;
-	ok((! system("perl -I. ./ikiwiki.out -plugin txt -plugin rawhtml -underlaydir=underlays/basewiki -set underlaydirbase=underlays -templatedir=templates $srcdir $destdir @_")),
+	ok((! system(@command, qw(--plugin txt --plugin rawhtml),
+				$srcdir, $destdir, @_)),
 		$testdesc);
 }
 sub refreshiki {
@@ -127,5 +143,4 @@ ok(! system("mkdir -p $srcdir/foo"));
 ok(! system("touch $srcdir/foo/index.html"));
 setupiki("rawhtml file rendered same as existing page in setup");
 
-# cleanup
-ok(! system("rm -rf t/tmp"));
+done_testing;