htmlcomment.t 1.1 KB

123456789101112131415161718192021222324252627282930313233
  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: htmlcomment.t,v 1.1 2008/02/22 09:24:27 weakish Exp $
  10. require './t/test.pl';
  11. package OddMuse;
  12. use Test::More tests => 6;
  13. add_module('htmlcomment.pl');
  14. run_tests(split('\n',<<'EOT'));
  15. /*\nThis is a comment\n*/
  16. <!--This is a comment\n-->
  17. /*\nA comment can have\nMulti-lines\n\nas this one\n*/
  18. <!--A comment can have\nMulti-lines\n\nas this one\n-->
  19. /*This is not a comment */
  20. /*This is not a comment */
  21. /*\nThis is not a comment either,\n*/ cause */ is not on a line by itself.
  22. /* This is not a comment either, */ cause */ is not on a line by itself.
  23. /*\nThis is a comment\n */ This is the second line\nComment ends here.\n*/
  24. <!--This is a comment\n*/ This is the second line\nComment ends here.\n-->
  25. /*\nSome special characters like < and > will be encoded.\n*/
  26. <!--Some special characters like &lt; and &gt; will be encoded.\n-->
  27. EOT