-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
259f066
commit 1c0820e
Showing
307 changed files
with
14,693 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<html><body></body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
#!/usr/bin/env perl | ||
|
||
use strict; | ||
use warnings; | ||
|
||
BEGIN { | ||
if($ENV{'REMOTE_ADDR'}) { | ||
# A web crawler has found this file stored on a site | ||
exit(0); | ||
} | ||
} | ||
|
||
no lib '.'; | ||
|
||
use Gzip::Faster; | ||
use Test::Most; | ||
use Test::CGI::External; # https://metacpan.org/pod/release/BKB/Test-CGI-External-0.02/lib/Test/CGI/External.pod | ||
use FindBin; | ||
use autodie qw(:all); | ||
|
||
$ENV{'GATEWAY_INTERFACE'} = 'CGI/1.1'; | ||
$ENV{'SERVER_PORT'} = 443; | ||
$ENV{'NO_CACHE'} = 1; | ||
|
||
my $t = Test::CGI::External->new(); | ||
|
||
$ENV{'REMOTE_ADDR'} = '212.159.106.41'; # Send the logging to a file not stdout | ||
|
||
# $t->set_cgi_executable("$FindBin::Bin/bb-links.fcgi", '--mobile'); | ||
$t->set_cgi_executable("$FindBin::Bin/../cgi-bin/page.fcgi"); | ||
|
||
my %options; | ||
|
||
diag('Basic sanity tests'); | ||
$t->set_verbosity(1); | ||
|
||
diag('Test no arguments'); | ||
$t->run(\%options); | ||
|
||
# Don't do these tests earlier, since the 300 response won't be compressed or cached | ||
$t->do_compression_test(1); | ||
$t->do_caching_test(1); | ||
|
||
$ENV{'HTTP_ACCEPT_LANGUAGE'} = 'en'; | ||
$options{'REQUEST_METHOD'} = 'GET'; | ||
$options{'QUERY_STRING'} = 'page=people&home=1'; | ||
$t->run(\%options); | ||
# diag($options{'body'}); | ||
|
||
$options{'QUERY_STRING'} = 'page=mailto'; | ||
$t->run(\%options); | ||
# diag($options{'body'}); | ||
|
||
$options{'QUERY_STRING'} = 'page=mailto&lang=en'; | ||
$t->run(\%options); | ||
|
||
$ENV{'HTTP_ACCEPT_LANGUAGE'} = 'fr'; | ||
$options{'QUERY_STRING'} = 'page=mailto&lang=fr'; | ||
$t->run(\%options); | ||
# diag($options{'body'}); | ||
|
||
diag('test not implemented'); | ||
$t->test_not_implemented(); | ||
|
||
diag('test not allowed'); | ||
$t->test_method_not_allowed('DELETE'); | ||
|
||
diag('test HTTP 411'); | ||
$t->test_411(); | ||
|
||
diag('Finishing'); | ||
done_testing(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
set -e | ||
|
||
cd ../data && rm -f *.sql | ||
csv2sqlite -o sep_char='!' surnames.csv surnames.sql | ||
[ -r censuses.csv ] && csv2sqlite -o sep_char='!' censuses.csv censuses.sql | ||
csv2sqlite -o sep_char='!' name_date.csv name_date.sql | ||
csv2sqlite -o sep_char='!' surname_date.csv surname_date.sql | ||
csv2sqlite -o sep_char='!' -o allow_loose_quotes=1 people.csv people.sql | ||
[ -r todo.csv ] && csv2sqlite -o sep_char='!' todo.csv todo.sql | ||
csv2sqlite -o sep_char='!' history.csv history.sql |
Oops, something went wrong.