diff options
| author | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-03-07 12:10:03 +0000 |
|---|---|---|
| committer | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-03-07 12:10:03 +0000 |
| commit | 1376c68a2cd896ed33e03c251720c700fb07b86e (patch) | |
| tree | 4faf09890511fce6f2f2d54b7af5a7f9ca18515f /test | |
| parent | ff451b6ee67da29f88112b6db88a856d89731d7b (diff) | |
| download | ruby-1376c68a2cd896ed33e03c251720c700fb07b86e.tar.gz ruby-1376c68a2cd896ed33e03c251720c700fb07b86e.tar.xz ruby-1376c68a2cd896ed33e03c251720c700fb07b86e.zip | |
* ext/openssl/ossl_ssl.c (ossl_start_ssl, ossl_ssl_read,
ossl_ssl_write):
- need to set errno on Win32 platform.
- should call rb_sys_fail instead of rasing SSLError if
SSL_ERROR_SYSCALL occured.
- should wait for that the underlying IO become readable or
writable if the error was SSL_ERROR_WANT_READ or
SSL_ERROR_WANT_WRITE. [ruby-dev:25795]
* ext/openssl/lib/openssl/buffering.rb
(Buffering#initialize): should set @eof and @rbuffer.
(Buffering#fill_rbuff): should rescue Errno::EAGAIN.
(Buffering#consume_rbuf): pointless eof flag resetting is deleted.
(Buffering#read): should return an empty string if the specified
size is zero.
(Buffering#readpartial): new method.
(Buffering#readline): fix typo.
(Buffering#getc): return the first character of string correctly.
(Buffering#each): fix typo. suggested by Brian Ollenberger.
(Buffering#readchar): fix typo.
(Buffering#eof?): should read again it the input buffer is empty.
(Buffering#do_write): should rescue Errno::EAGAIN.
(Buffering#puts): use "\n" as the output field separator.
* ext/openssl/lib/openssl/ssl.rb: set non-blocking flag to the
underlying IO.
* ext/openssl/extconf.rb: get rid of GNUmakefile generation.
* text/openssl/test_pair.rb: test for IO like methods.
* test/ruby/ut_eof.rb: test about empty file.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
| -rw-r--r-- | test/ruby/ut_eof.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/ruby/ut_eof.rb b/test/ruby/ut_eof.rb index eff0bddc0..e6f6eddd6 100644 --- a/test/ruby/ut_eof.rb +++ b/test/ruby/ut_eof.rb @@ -83,6 +83,19 @@ module TestEOF } end + def test_eof_2 + open_file("") {|f| + assert_equal("", f.read) + assert(f.eof?) + } + end + + def test_eof_3 + open_file("") {|f| + assert(f.eof?) + } + end + module Seek def open_file_seek(content, pos) open_file(content) do |f| |
