1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
naruse 2008-08-26 07:18:35 +00:00
parent 67515222a1
commit 990ffbb96a
2 changed files with 73 additions and 0 deletions

View file

@ -1,3 +1,8 @@
Tue Aug 26 16:16:43 2008 NARUSE, Yui <naruse@ruby-lang.org>
* test/cgi/test_cgi_tag_helper.rb: add more tests for html3.
Patch by Takeyuki Fujioka. [ruby-dev:35975]
Tue Aug 26 14:43:10 2008 Akinori MUSHA <knu@iDaemons.org>
* enumerator.c: Activate Enumerator#with_object and add

View file

@ -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