summaryrefslogtreecommitdiff
path: root/test/cgi
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-26 07:18:35 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-26 07:18:35 +0000
commit990ffbb96a91a45f40aa4b9c19001e4eb7278bf9 (patch)
tree5e902f06e8537d7c1136bec31979ffd5bbb06a36 /test/cgi
parent67515222a12dfed9e8e76ee18764cb8afeadeb84 (diff)
* test/cgi/test_cgi_tag_helper.rb: add more tests for html3.
Patch by Takeyuki Fujioka. [ruby-dev:35975] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/cgi')
-rwxr-xr-xtest/cgi/test_cgi_tag_helper.rb68
1 files changed, 68 insertions, 0 deletions
diff --git a/test/cgi/test_cgi_tag_helper.rb b/test/cgi/test_cgi_tag_helper.rb
index 4e46e717825..2651d14a8c8 100755
--- a/test/cgi/test_cgi_tag_helper.rb
+++ b/test/cgi/test_cgi_tag_helper.rb
@@ -237,6 +237,74 @@ class CGICoreTest < Test::Unit::TestCase
assert_equal('<CAPTION ALIGN="bar"></CAPTION>',cgi.caption('bar'))
assert_equal('<CAPTION>foo</CAPTION>',cgi.caption{'foo'})
assert_equal('<CAPTION ALIGN="bar">foo</CAPTION>',cgi.caption('bar'){'foo'})
+ assert_equal('<IMG SRC="" ALT="">',cgi.img)
+ assert_equal('<IMG SRC="bar" ALT="">',cgi.img('bar'))
+ assert_equal('<IMG SRC="" ALT="">',cgi.img{'foo'})
+ assert_equal('<IMG SRC="bar" ALT="">',cgi.img('bar'){'foo'})
+ assert_equal('<BASE HREF="">',cgi.base)
+ assert_equal('<BASE HREF="bar">',cgi.base('bar'))
+ assert_equal('<BASE HREF="">',cgi.base{'foo'})
+ assert_equal('<BASE HREF="bar">',cgi.base('bar'){'foo'})
+ assert_equal('<BASEFONT>',cgi.basefont)
+ assert_equal('<BASEFONT>',cgi.basefont('bar'))
+ assert_equal('<BASEFONT>',cgi.basefont{'foo'})
+ assert_equal('<BASEFONT>',cgi.basefont('bar'){'foo'})
+ assert_equal('<BR>',cgi.br)
+ assert_equal('<BR>',cgi.br('bar'))
+ assert_equal('<BR>',cgi.br{'foo'})
+ assert_equal('<BR>',cgi.br('bar'){'foo'})
+ assert_equal('<AREA>',cgi.area)
+ assert_equal('<AREA>',cgi.area('bar'))
+ assert_equal('<AREA>',cgi.area{'foo'})
+ assert_equal('<AREA>',cgi.area('bar'){'foo'})
+ assert_equal('<LINK>',cgi.link)
+ assert_equal('<LINK>',cgi.link('bar'))
+ assert_equal('<LINK>',cgi.link{'foo'})
+ assert_equal('<LINK>',cgi.link('bar'){'foo'})
+ assert_equal('<PARAM>',cgi.param)
+ assert_equal('<PARAM>',cgi.param('bar'))
+ assert_equal('<PARAM>',cgi.param{'foo'})
+ assert_equal('<PARAM>',cgi.param('bar'){'foo'})
+ assert_equal('<HR>',cgi.hr)
+ assert_equal('<HR>',cgi.hr('bar'))
+ assert_equal('<HR>',cgi.hr{'foo'})
+ assert_equal('<HR>',cgi.hr('bar'){'foo'})
+ assert_equal('<INPUT>',cgi.input)
+ assert_equal('<INPUT>',cgi.input('bar'))
+ assert_equal('<INPUT>',cgi.input{'foo'})
+ assert_equal('<INPUT>',cgi.input('bar'){'foo'})
+ assert_equal('<ISINDEX>',cgi.isindex)
+ assert_equal('<ISINDEX>',cgi.isindex('bar'))
+ assert_equal('<ISINDEX>',cgi.isindex{'foo'})
+ assert_equal('<ISINDEX>',cgi.isindex('bar'){'foo'})
+ assert_equal('<META>',cgi.meta)
+ assert_equal('<META>',cgi.meta('bar'))
+ assert_equal('<META>',cgi.meta{'foo'})
+ assert_equal('<META>',cgi.meta('bar'){'foo'})
+ assert_equal('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><HTML>',cgi.html)
+ assert_equal('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><HTML>foo</HTML>',cgi.html{'foo'})
+ assert_equal('<HEAD>',cgi.head)
+ assert_equal('<HEAD>foo</HEAD>',cgi.head{'foo'})
+ assert_equal('<BODY>',cgi.body)
+ assert_equal('<BODY>foo</BODY>',cgi.body{'foo'})
+ assert_equal('<P>',cgi.p)
+ assert_equal('<P>foo</P>',cgi.p{'foo'})
+ assert_equal('<PLAINTEXT>',cgi.plaintext)
+ assert_equal('<PLAINTEXT>foo</PLAINTEXT>',cgi.plaintext{'foo'})
+ assert_equal('<DT>',cgi.dt)
+ assert_equal('<DT>foo</DT>',cgi.dt{'foo'})
+ assert_equal('<DD>',cgi.dd)
+ assert_equal('<DD>foo</DD>',cgi.dd{'foo'})
+ assert_equal('<LI>',cgi.li)
+ assert_equal('<LI>foo</LI>',cgi.li{'foo'})
+ assert_equal('<OPTION>',cgi.option)
+ assert_equal('<OPTION>foo</OPTION>',cgi.option{'foo'})
+ assert_equal('<TR>',cgi.tr)
+ assert_equal('<TR>foo</TR>',cgi.tr{'foo'})
+ assert_equal('<TH>',cgi.th)
+ assert_equal('<TH>foo</TH>',cgi.th{'foo'})
+ assert_equal('<TD>',cgi.td)
+ assert_equal('<TD>foo</TD>',cgi.td{'foo'})
end
=begin