/[webpac2]/Webpacus/t/01app.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /Webpacus/t/01app.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 359 - (show annotations)
Sun Jan 8 14:52:24 2006 UTC (18 years, 4 months ago) by dpavlin
File MIME type: application/x-troff
File size: 856 byte(s)
 r386@llin:  dpavlin | 2006-01-08 15:52:38 +0100
 fixed sites testing, completed tests (which fail for a reason :-), minor tweaks to
 localisaion

1 #!/usr/bin/perl -w
2
3 use strict;
4 use Test::More tests => 39;
5 use blib;
6 use Catalyst::Test 'Webpacus';
7
8 # test some URIs
9
10 my $test_site = 'hr';
11
12 foreach my $url (qw#
13 /
14 /search
15 /search/results
16 /search/results/ajax
17 /search/results?all=a
18 /search/results/ajax?all=a
19 /search/results?all=a&_ajax=1
20 /search/results/ajax?all=a&_ajax=1
21 /search/suggest
22 /search/suggest/TitleProper?all=a
23 /editor
24 /editor/template
25 /editor/css
26 #) {
27 ok( my $default = get( $url ), "get $url");
28 my $site_url = "/$test_site/$url";
29 $site_url =~ s#//+#/#g;
30 ok( my $sites = get( $site_url ), "get $site_url" );
31
32 # normalize site html for comparison
33 $sites =~ s#/\Q$test_site\E/#/#gs;
34
35 my $op = 'ne';
36 # part which doesn't change depending on site
37 $op = 'eq' if ($url =~ m#^/(editor|search/suggest)#);
38
39 cmp_ok( $default, $op, $sites, "site content $url $op $site_url");
40 }
41

  ViewVC Help
Powered by ViewVC 1.1.26