From 9636fe2e0a5fdf370eeef720e2f508ea66628b2d Mon Sep 17 00:00:00 2001 From: Alex Schroeder Date: Tue, 7 Jul 2015 14:17:30 +0200 Subject: [PATCH] Various tests fixed $WikiLinks changed default value and must therefore be provided. CSS class for intermap links changed. --- t/clusters.t | 1 + t/cookie.t | 1 + t/creole.t | 2 ++ t/namespaces.t | 3 ++- t/near-links.t | 1 + 5 files changed, 7 insertions(+), 1 deletion(-) diff --git a/t/clusters.t b/t/clusters.t index 554b8b13..145e07c7 100644 --- a/t/clusters.t +++ b/t/clusters.t @@ -21,6 +21,7 @@ package OddMuse; use Test::More tests => 33; AppendStringToFile($ConfigFile, "\$PageCluster = 'Cluster';\n"); +AppendStringToFile($ConfigFile, "\$WikiLinks = 1;\n"); update_page('ClusterIdea', 'This is just a page.', 'one'); update_page('ClusterIdea', "This is just a page.\nBut somebody has to do it.", 'two'); diff --git a/t/cookie.t b/t/cookie.t index 86c648a3..77eb6d11 100644 --- a/t/cookie.t +++ b/t/cookie.t @@ -33,6 +33,7 @@ test_page(get_page('action=browse id=HomePage username=AlexSchroeder'), test_page(get_page('action=browse id=HomePage username=Alex%20Schroeder'), 'username=Alex Schroeder'); AppendStringToFile($ConfigFile, "\$FreeLinks = 0;\n"); +AppendStringToFile($ConfigFile, "\$WikiLinks = 1;\n"); test_page(get_page('action=browse id=HomePage username=Alex%20Schroeder'), 'Invalid UserName Alex Schroeder: not saved'); test_page(get_page('action=browse id=HomePage username=AlexSchroeder'), diff --git a/t/creole.t b/t/creole.t index 65981116..37223c42 100644 --- a/t/creole.t +++ b/t/creole.t @@ -23,6 +23,8 @@ add_module('creole.pl'); # Permit testing of dash-style list markup. $CreoleDashStyleUnorderedLists = 1; +$WikiLinks = 1; + run_tests(split('\n',<<'EOT')); # one
  1. one
diff --git a/t/namespaces.t b/t/namespaces.t index 7d31fa7c..662da69d 100644 --- a/t/namespaces.t +++ b/t/namespaces.t @@ -18,6 +18,7 @@ use Test::More tests => 77; use utf8; # tests contain UTF-8 characters and it matters add_module('namespaces.pl'); +AppendStringToFile($ConfigFile, "\$WikiLinks = 1;\n"); test_page_negative(get_page('/Test?username=alex'), 'Wiki Test: Test'); @@ -83,7 +84,7 @@ xpath_test(get_page('action=browse id=Goo ns=Ford oldid=Muu:Mu'), '//div[@class="message"]/p[contains(text(),"redirected from")]/a[@class="edit"][@title="Click to edit this page"][@href="http://localhost/wiki.pl/Muu?action=edit;id=Mu"][text()="Muu:Mu"]'); # check Main:Mu and verify that only a single redirection hop is allowed xpath_test(get_page('action=browse id=Mu ns=Muu oldid=Main:Mu'), - '//div/p[contains(text(),"#REDIRECT")]/a[@href="http://localhost/wiki.pl/Ford/Goo"][@class="inter Ford"]/span[@class="site"][text()="Ford"]/following-sibling::span[@class="page"][text()="Goo"]'); + '//div/p[contains(text(),"#REDIRECT")]/a[@href="http://localhost/wiki.pl/Ford/Goo"][@class="inter Ford"]/span[@class="site"][text()="Ford"]/following-sibling::span[@class="interpage"][text()="Goo"]'); # redirecting back to the Main namespace is different, so test separately test_page(update_page('BackHome', '#REDIRECT Main:HomePage', undef, undef, undef, 'ns=Muu'), 'Status: 302', diff --git a/t/near-links.t b/t/near-links.t index 017ff950..5d6960ad 100644 --- a/t/near-links.t +++ b/t/near-links.t @@ -17,6 +17,7 @@ package OddMuse; use Test::More tests => 16; add_module('near-links.pl'); +AppendStringToFile($ConfigFile, "\$WikiLinks = 1;\n"); CreateDir($NearDir); WriteStringToFile("$NearDir/EmacsWiki", "AlexSchroeder\nFooBar\n"