meta-data.t 1.4 KB

12345678910111213141516171819202122232425262728293031
  1. # Copyright (C) 2008 Alex Schroeder <alex@gnu.org>
  2. #
  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.
  7. #
  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.
  12. #
  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/>.
  15. require 't/test.pl';
  16. package OddMuse;
  17. use Test::More tests => 5;
  18. AppendStringToFile($ConfigFile, qq(\$HtmlHeaders = '<meta name="ICBM" content="47.3787648948578, 8.52716503722805">'
  19. . '<meta name="DC.title" content="Home of Alex">';\n));
  20. xpath_test(get_page('HomePage'),
  21. '//link[@rel="alternate"][@type="application/rss+xml"][@title="Wiki"][@href="http://localhost/wiki.pl?action=rss"]',
  22. '//meta[@name="DC.title"][@content="Home of Alex"]',
  23. '//meta[@name="ICBM"][@content="47.3787648948578, 8.52716503722805"]');
  24. negative_xpath_test(get_page('action=version'),
  25. '//meta[@type="application/wiki"]');
  26. xpath_test(get_page('Foo'),
  27. '//link[@type="application/wiki"][@title="Edit this page"][@rel="alternate"][@href="http://localhost/wiki.pl?action=edit;id=Foo"]');