diff options
author | Simon McVittie <smcv@debian.org> | 2015-11-30 17:33:00 +0000 |
---|---|---|
committer | Simon McVittie <smcv@debian.org> | 2015-11-30 18:26:22 +0000 |
commit | cdfb4ab1a3c60bf699b8d77618ec9bdf526cdb35 (patch) | |
tree | 6a33fd51436d66178fdfab689a8c6076cefa1c54 /t/inline.t | |
parent | 78a47d44c7c7d798c0a16c17954caef57e4c192e (diff) | |
download | ikiwiki-cdfb4ab1a3c60bf699b8d77618ec9bdf526cdb35.tar ikiwiki-cdfb4ab1a3c60bf699b8d77618ec9bdf526cdb35.tar.gz |
Run autopkgtest tests using autodep8 and the pkg-perl team's infrastructure
Diffstat (limited to 't/inline.t')
-rwxr-xr-x | t/inline.t | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/t/inline.t b/t/inline.t index 9bad525be..41957f89e 100755 --- a/t/inline.t +++ b/t/inline.t @@ -4,6 +4,24 @@ use strict; use Test::More; use IkiWiki; +my $installed = $ENV{INSTALLED_TESTS}; + +my @command; +if ($installed) { + @command = qw(ikiwiki); +} +else { + ok(! system("make -s ikiwiki.out")); + @command = qw(perl -I. ./ikiwiki.out + --underlaydir=underlays/basewiki + --set underlaydirbase=underlays + --templatedir=templates); +} + +push @command, qw(--set usedirs=0 --plugin inline + --url=http://example.com --cgiurl=http://example.com/ikiwiki.cgi + --rss --atom t/tmp/in t/tmp/out --verbose); + my $blob; my $add_new_post = gettext("Add a new post titled:"); @@ -35,13 +53,8 @@ foreach my $page (qw(protagonists/shepard protagonists/link write_old_file("$page.mdwn", "this page is {$page}"); } -ok(! system("make -s ikiwiki.out")); - -my $command = "perl -I. ./ikiwiki.out --set usedirs=0 --plugin inline --url=http://example.com --cgiurl=http://example.com/ikiwiki.cgi --rss --atom --underlaydir=underlays/basewiki --set underlaydirbase=underlays --templatedir=templates t/tmp/in t/tmp/out --verbose"; - -ok(! system($command)); - -ok(! system("$command --refresh")); +ok(! system(@command)); +ok(! system(@command, "--refresh")); $blob = readfile("t/tmp/out/protagonists.html"); like($blob, qr{\Q$add_new_post\E}, 'rootpage=yes gives postform'); |