Class | XhtmlTest |
In: |
lib/feed_tools/vendor/html5/tests/test_lxp.rb
|
Parent: | Test::Unit::TestCase |
# File lib/feed_tools/vendor/html5/tests/test_lxp.rb, line 196 196: def test_br 197: assert_xhtml_equal "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head><title>BR</title></head>\n<body>\n<br/>\n</body></html>\n" 198: end
# File lib/feed_tools/vendor/html5/tests/test_lxp.rb, line 97 97: def test_mathml 98: assert_xhtml_equal "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head><title>MathML</title></head>\n<body>\n <math xmlns=\"http://www.w3.org/1998/Math/MathML\">\n <mrow>\n <mi>x</mi>\n <mo>=</mo>\n\n <mfrac>\n <mrow>\n <mrow>\n <mo>-</mo>\n <mi>b</mi>\n </mrow>\n <mo>±</mo>\n <msqrt>\n\n <mrow>\n <msup>\n <mi>b</mi>\n <mn>2</mn>\n </msup>\n <mo>-</mo>\n <mrow>\n\n <mn>4</mn>\n <mo>⁢</mo>\n <mi>a</mi>\n <mo>⁢</mo>\n <mi>c</mi>\n </mrow>\n </mrow>\n\n </msqrt>\n </mrow>\n <mrow>\n <mn>2</mn>\n <mo>⁢</mo>\n <mi>a</mi>\n </mrow>\n </mfrac>\n\n </mrow>\n </math>\n</body></html>\n" 99: end
# File lib/feed_tools/vendor/html5/tests/test_lxp.rb, line 257 257: def test_prolog 258: assert_xhtml_equal "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head><title>PROLOG</title></head>\n<body>\n</body></html>\n", "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head><title>PROLOG</title></head>\n<body>\n</body></html>\n".strip 259: end
# File lib/feed_tools/vendor/html5/tests/test_lxp.rb, line 218 218: def test_script 219: assert_xhtml_equal "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head><title>SCRIPT</title></head>\n<body>\n<script>1 < 2 & 3</script>\n</body></html>\n" 220: end
# File lib/feed_tools/vendor/html5/tests/test_lxp.rb, line 229 229: def test_script_src 230: assert_xhtml_equal "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head><title>SCRIPT</title><script src=\"http://example.com\"/></head>\n<body>\n<script>1 < 2 & 3</script>\n</body></html>\n", "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head><title>SCRIPT</title><script src=\"http://example.com\"></script></head>\n<body>\n<script>1 < 2 & 3</script>\n</body></html>\n".strip 231: end
# File lib/feed_tools/vendor/html5/tests/test_lxp.rb, line 207 207: def test_strong 208: assert_xhtml_equal "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head><title>STRONG</title></head>\n<body>\n<strong></strong>\n</body></html>\n" 209: end
# File lib/feed_tools/vendor/html5/tests/test_lxp.rb, line 148 148: def test_svg 149: assert_xhtml_equal "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head><title>SVG</title></head>\n<body>\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\">\n <path d=\"M38,38c0-12,24-15,23-2c0,9-16,13-16,23v7h11v-4c0-9,17-12,17-27\n c-2-22-45-22-45,3zM45,70h11v11h-11z\" fill=\"#371\">\n </path>\n <circle cx=\"50\" cy=\"50\" r=\"45\" fill=\"none\" stroke=\"#371\" stroke-width=\"10\">\n </circle>\n\n </svg>\n</body></html>\n" 150: end
# File lib/feed_tools/vendor/html5/tests/test_lxp.rb, line 274 274: def test_tagsoup 275: assert_xhtml_equal "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head><title>TAGSOUP</title></head>\n<body>\n<u><blockquote><p></u>\n</body></html>\n", "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head><title>TAGSOUP</title></head>\n<body>\n<u/><blockquote><u/><p><u/>\n</p></blockquote></body></html>\n".strip 276: end
# File lib/feed_tools/vendor/html5/tests/test_lxp.rb, line 247 247: def test_title 248: assert_xhtml_equal "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head><title>1 < 2 & 3</title></head>\n<body>\n</body></html>\n" 249: end
# File lib/feed_tools/vendor/html5/tests/test_lxp.rb, line 166 166: def test_xlink 167: assert_xhtml_equal "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head><title>XLINK</title></head>\n<body>\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 100 100\">\n <defs xmlns:l=\"http://www.w3.org/1999/xlink\">\n <radialGradient id=\"s1\" fx=\".4\" fy=\".2\" r=\".7\">\n <stop stop-color=\"#FE8\"/>\n <stop stop-color=\"#D70\" offset=\"1\"/>\n </radialGradient>\n <radialGradient id=\"s2\" fx=\".8\" fy=\".5\" l:href=\"#s1\"/>\n <radialGradient id=\"s3\" fx=\".5\" fy=\".9\" l:href=\"#s1\"/>\n <radialGradient id=\"s4\" fx=\".1\" fy=\".5\" l:href=\"#s1\"/>\n </defs>\n <g stroke=\"#940\">\n <path d=\"M73,29c-37-40-62-24-52,4l6-7c-8-16,7-26,42,9z\" fill=\"url(#s1)\"/>\n <path d=\"M47,8c33-16,48,21,9,47l-6-5c38-27,20-44,5-37z\" fill=\"url(#s2)\"/>\n <path d=\"M77,32c22,30,10,57-39,51l-1-8c3,3,67,5,36-36z\" fill=\"url(#s3)\"/>\n\n <path d=\"M58,84c-4,20-38-4-8-24l-6-5c-36,43,15,56,23,27z\" fill=\"url(#s4)\"/>\n <path d=\"M40,14c-40,37-37,52-9,68l1-8c-16-13-29-21,16-56z\" fill=\"url(#s1)\"/>\n <path d=\"M31,33c19,23,20,7,35,41l-9,1.7c-4-19-8-14-31-37z\" fill=\"url(#s2)\"/>\n </g>\n </svg>\n</body></html>\n" 168: end