html_comment.t 781 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. . tests/functions.sh
  2. title "html comments"
  3. rc=0
  4. MARKDOWN_FLAGS=
  5. try 'html comments' \
  6. '<!--
  7. **hi**
  8. -->' \
  9. '<!--
  10. **hi**
  11. -->'
  12. try 'comment with trailing text' '<!-- this is -->a test' \
  13. '<p><!-- this is -->a test</p>'
  14. COMMENTS='<!-- 1. -->line 1
  15. <!-- 2. -->line 2'
  16. try 'two comments' "$COMMENTS" \
  17. '<p><!-- 1. -->line 1</p>
  18. <p><!-- 2. -->line 2</p>'
  19. COMMENTS='<!-- 1. -->line 1
  20. <!-- 2. -->line 2'
  21. try 'two adjacent comments' "$COMMENTS" \
  22. '<p><!-- 1. -->line 1
  23. <!-- 2. -->line 2</p>'
  24. try 'comment, no white space' '<!--foo-->' '<!--foo-->'
  25. try 'comment, indented end with trailing text' \
  26. '<!--
  27. -->00000' \
  28. '<p><!--
  29. -->00000</p>'
  30. try 'comment with leading text' 'Text text text<!--
  31. -->' \
  32. '<p>Text text text<!--
  33. --></p>'
  34. summary $0
  35. exit $rc