From: intrigeri Date: Mon, 2 Feb 2026 13:35:43 +0000 X-Dgit-Generated: 3.20260201-3 92ef2bf3407f2234a6f22d5957a7c0fc2db9a99d Subject: Fix po.t when testing the installed ikiwiki rather a source tree --- diff --git a/t/po.t b/t/po.t index 106ad0280..9affa46ad 100755 --- a/t/po.t +++ b/t/po.t @@ -553,24 +553,38 @@ like($output{'utf8.fr'}, qr{ ### Integration tests -ok(! system("make -s ikiwiki.out")); -my @command = ( - "perl", "-I".getcwd(), - qw( - ./ikiwiki.out - --underlaydir=/dev/null - --set underlaydirbase=/dev/null - --templatedir=templates - --no-discussion - --plugin html - --plugin po - ), - '--set-yaml', 'po_master_language={code: en, name: English}', - '--set-yaml', 'po_slave_languages={es: Castellano, fr: Français}', - '--set-yaml', 'po_translatable_pages=[html1, html2]', - '--set', 'po_translatable_pages="index or test1 or test2 or html1 or html2 or translatable or debian* or utf8"', +my $installed = $ENV{INSTALLED_TESTS}; + +my @command; +my @options = ( + qw( + --underlaydir=/dev/null + --set underlaydirbase=/dev/null + --no-discussion + --plugin html + --plugin po + ), + '--set-yaml', 'po_master_language={code: en, name: English}', + '--set-yaml', 'po_slave_languages={es: Castellano, fr: Français}', + '--set-yaml', 'po_translatable_pages=[html1, html2]', + '--set', 'po_translatable_pages="index or test1 or test2 or html1 or html2 or translatable or debian* or utf8"', ); +if ($installed) { + @command = ('ikiwiki', @options); +} +else { + ok(! system("make -s ikiwiki.out")); + @command = ( + "perl", "-I".getcwd(), + qw( + ./ikiwiki.out + --templatedir=templates + ), + @options, + ); +} + sub runiki { my $testdesc=shift; ok((! system(@command, $config{srcdir}, $config{destdir}, @_)), $testdesc);