1 # Copyright (C) 2013 Alex Schroeder <alex@gnu.org>
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 3 of the License, or
6 # (at your option) any later version.
8 # This program is distributed in the hope that it will be useful, but
9 # WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 use Test::More tests => 5;
19 use utf8; # test data is UTF-8 and it matters
22 $ENV{'REMOTE_ADDR'}='127.0.0.1';
23 add_module('recaptcha.pl');
25 # The recaptcha module used to corrupt UTF-8 encoding and HTML
28 # non-existing page and no permission
29 test_page(get_page('title=SandBox text="<b>K%C3%BChlschrank</b>"'),
31 '<b>Kühlschrank</b>');
32 # update it as an admin
33 test_page(update_page('SandBox', '<b>Kühlschrank</b>', undef, undef, 1),
34 '<b>Kühlschrank</b>');
35 # existing page and no permission
36 test_page(get_page('title=SandBox text="<b>K%C3%BChlschrank-test</b>"'),
38 '<b>Kühlschrank-test</b>');