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_header.rb(test_cgi_header_nph): Fix bug depends to

time. The test fails if time past 1 second in line 136-145

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
sorah 2011-07-06 05:54:01 +00:00
parent 43dc0d4080
commit 453726f26a
2 changed files with 11 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Wed Jul 6 12:18:09 2011 Shota Fukumori <sorah@tubusu.net>
* test/cgi/test_cgi_header.rb(test_cgi_header_nph): Fix bug depends to
time. The test fails if time past 1 second in line 136-145
Tue Jul 5 15:28:04 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
* parse.y (parser_here_document): should dispatch heredoc_end

View file

@ -143,9 +143,14 @@ class CGIHeaderTest < Test::Unit::TestCase
ENV['SERVER_SOFTWARE'] = 'IIS/5.0'
actual4 = cgi.header
actual5 = cgi.header('status'=>'REDIRECT', 'location'=>'http://www.example.com/')
date = /^Date: [A-Z][a-z]{2}, \d{2} [A-Z][a-z]{2} \d{4} \d\d:\d\d:\d\d GMT\r\n/
[actual1,actual2,actual3].each do |actual|
assert_match(date,actual)
actual.sub!(date,"Date: DATE_IS_REMOVED\r\n")
end
## assertion
expected = "HTTP/1.1 200 OK\r\n"
expected << "Date: #{CGI.rfc1123_date(now)}\r\n"
expected << "Date: DATE_IS_REMOVED\r\n"
expected << "Server: Apache 2.2.0\r\n"
expected << "Connection: close\r\n"
expected << "Content-Type: text/html\r\n"