summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rwxr-xr-xtest/cgi/test_cgi_tag_helper.rb68
2 files changed, 73 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index cc10493d318..09e3248d345 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
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