You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ja...@apache.org on 2018/10/20 11:43:10 UTC
svn commit: r1844414 - /httpd/test/framework/trunk/t/modules/speling.t
Author: jailletc36
Date: Sat Oct 20 11:43:10 2018
New Revision: 1844414
URL: http://svn.apache.org/viewvc?rev=1844414&view=rev
Log:
Tweak test.
Check the answer and look for what is expected
Modified:
httpd/test/framework/trunk/t/modules/speling.t
Modified: httpd/test/framework/trunk/t/modules/speling.t
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/modules/speling.t?rev=1844414&r1=1844413&r2=1844414&view=diff
==============================================================================
--- httpd/test/framework/trunk/t/modules/speling.t (original)
+++ httpd/test/framework/trunk/t/modules/speling.t Sat Oct 20 11:43:10 2018
@@ -29,22 +29,29 @@ my @testcases = (
['several0.html', "multiple choise", 300, 404],
);
-plan tests => scalar @testcasespaths * scalar @testcases, need 'mod_speling';
+plan tests => scalar @testcasespaths * scalar @testcases * 2, need 'mod_speling';
my $r;
my $code = 2;
-# disable redirect
+# Disable redirect
local $Apache::TestRequest::RedirectOK = 0;
foreach my $p (@testcasespaths) {
foreach my $t (@testcases) {
##
$r = GET($p->[0] . $t->[0]);
- print $r->content;
# Checking for return code
ok t_cmp($r->code, $t->[$code], "Checking " . $t->[1] . ". Expecting: ". $t->[$code]);
+
+ # Checking that the expected filename is in the answer
+ if ($t->[$code] != 200 && $t->[$code] != 404) {
+ ok t_cmp($r->content, qr/good\.html|several1\.html/, "Redirect ok");
+ }
+ else {
+ skip "Skipping. No redirect with status " . $t->[$code];
+ }
}
$code = $code+1;