fieldlist.t 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. # Copyright (C) 2008 Weakish Jiang <weakish@gmail.com>
  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 version 2 as
  5. # published by the Free Software Foundation.
  6. #
  7. # You can get a copy of GPL version 2 at
  8. # http://www.gnu.org/licenses/gpl-2.0.html
  9. # $Id: fieldlist.t,v 1.1 2008/02/23 17:12:12 weakish Exp $
  10. require './t/test.pl';
  11. package OddMuse;
  12. use Test::More tests => 9;
  13. add_module('fieldlist.pl');
  14. run_tests(split('\n',<<'EOT'));
  15. :foo:bar
  16. <dl class="fieldlist"><dt>foo</dt><dd>bar</dd></dl>
  17. :foo: bar
  18. <dl class="fieldlist"><dt>foo</dt><dd>bar</dd></dl>
  19. : foo : bar
  20. : foo : bar
  21. :author: weakish\n :sex:unknow
  22. <dl class="fieldlist"><dt>author</dt><dd>weakish</dd><dt>sex</dt><dd>unknow</dd></dl>
  23. :author:weakish\n:sex:unknow
  24. <dl class="fieldlist"><dt>author</dt><dd>weakish</dd><dt>sex</dt><dd>unknow</dd></dl>
  25. :main author: foo bar\n :s: Alex Joe
  26. <dl class="fieldlist"><dt>main author</dt><dd>foo bar</dd><dt>s</dt><dd>Alex Joe</dd></dl>
  27. :foo :bar
  28. :foo :bar
  29. :foo: bar:
  30. <dl class="fieldlist"><dt>foo</dt><dd>bar:</dd></dl>
  31. :foo:bar:
  32. <dl class="fieldlist"><dt>foo</dt><dd>bar:</dd></dl>
  33. EOT