summaryrefslogtreecommitdiff
path: root/test/ruby/test_io.rb
AgeCommit message (Collapse)Author
2014-11-23io.c: preserve encodingsnobu
* io.c (must_respond_to): preserve encodings of variable name and class name in warning message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-16test/ruby/test_io.rb: remove unnecessary begin/endnormal
Unnecessary since r47422 when the "rescue IOError" clause was removed. * test/ruby/test_io.rb (test_readpartial_locktmp): remove unnecessary begin/end git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-13* test/lib/envutil.rb: Moved from test/ruby/.akr
* test/lib/find_executable.rb: Ditto. * test/lib/memory_status.rb: Ditto. * test/lib/test/unit.rb: require envutil. * test/: Don't require envutil in test files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-10* win32/win32.c, include/win32/win32.h (rb_w32_set_nonblock): newusa
function to support nonblock-mode of pipes. * win32/win32.c (rb_w32_read): nonblock-mode pipe returns ERROR_NO_DATA if there is no data, but also returns it if remote-end is closed. * win32/win32.c (rb_w32_write): if cannot to write any data, it may be blocking. * io.c (rb_io_set_nonblock): use rb_w32_set_nonblock for Windows. * ext/io/nonblock/nonblock.c (rb_io_nonblock_set): use ruby's API when setting nonblock-mode. * test/ruby/test_io.rb: test nonblock pipes on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-01* test/ruby/envutil.rb (assert_join_threads): New assertion toakr
join multiple threads without exceptions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-25A test renamed.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-25* io.c (io_binwrite_string): Test writev() failure.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-03* test/ruby/test_io.rb (TestIO#test_advise): avoid to infinite loop.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-03* test/ruby/test_io.rb (TestIO#test_advise): added workaround of fadvise(2)hsbt
with tmpfs and old linux kernel. [ruby-core:65355][Bug #10313] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-02test_advice show OS and filesystem when failed.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-05test/ruby/test_io.rb: use IO#nonblock=normal
* test/ruby/test_io.rb (test_readpartial_locktmp): use IO#nonblock= Old fcntl invocation may drop necessary flags on some platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-05test/ruby/test_io.rb: avoid EBADFnormal
* test/ruby/test_io.rb (test_readpartial_locktmp): avoid EBADF [ruby-core:64773] [ruby-core:64775] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-02* test/ruby/test_io.rb (test_new_with_block): Set autoclose to avoid EBADF.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-02test_io.rb: ignore stream closed IOErrornobu
* test/ruby/test_io.rb (test_readpartial_locktmp): stream closed IOError while reading is not a matter. [Bug #10193] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-28test_io.rb: non UTF-8 patternnobu
* test/ruby/test_io.rb: (test_invalid_advise): fix pattern for non UTF-8 environment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-28io.c: preserve encodingsnobu
* io.c (advice_arg_check): preserve encodings in warning messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-28io.c: preserve encodingsnobu
* io.c (rb_io_s_new): preserve encodings in warning messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-26io.c: do not swallow exceptions at end of blocknobu
* io.c (io_close): ignore only "closed stream" IOError and NoMethodError, do not swallow other exceptions at the end of block. [ruby-core:64463] [Bug #10153] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-14test_io.rb: investigationnobu
* test/ruby/test_io.rb (test_readpartial_locktmp): check if the reader thread is alive before write. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-09test_io.rb: fix tempfile leaksnobu
* test/ruby/test_io.rb (test_flush_in_finalizer2): cannot unlink opened file on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-09test_io.rb: fix assertionnobu
* test/ruby/test_io.rb (test_advise): fix inverted arguments order by assert_nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-02test_io.rb: fix leaked threadsnobu
* test/ruby/test_io.rb (test_readpartial_locktmp): ensure reading thread is dead to fix leaked threads. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-06io.c: not shorten buffer unless succeedednobu
* io.c (io_setstrbuf, io_read): should not shorten the given buffer until read succeeds. [ruby-core:55951] [Bug #8625] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-29* io.c (rb_io_s_pipe): Close pipes if io_encoding_set() raises anakr
exception. (io_encoding_set_v): New function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-28* test/ruby/test_io.rb (test_flush_in_finalizer1): Useakr
ObjectSpace.each_object to close files. GC.start is not reliable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-27* test/lib/minitest/unit.rb: Use Tempfile#close! instead ofakr
Tempfile#unlink to close file descriptors. * test/openssl/test_config.rb: Ditto. * test/ruby/test_io.rb: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-27* test/ruby/test_io.rb (test_flush_in_finalizer1): some opened fds areusa
remain before GC, so unlink the tempfile is failed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-27* io.c (rb_io_autoclose_p): Don't raise on frozen IO.akr
* test/lib/minitest/unit.rb: IO#autoclose? may raise IOError. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-27io.c: no error on frozen IOnobu
* io.c (rb_io_fileno, rb_io_inspect): non-modification does not error on frozen IO. [ruby-dev:48241] [Bug #9865] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-22revert File::Statfs [Feature #9772]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-18Use Etc.uname instead of uname command invocation.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-17io.c: buffer must be modifiablenobu
* io.c (io_setstrbuf): always check if the buffer is modifiable. [ruby-core:62643] [Bug #9847] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-02test_io.rb: defer f_typenobu
* test/ruby/test_io.rb (test_seek, test_seek_symwhence): defer File::Statfs#type call which may not be implemented, to mitigate errors on platforms where SEEK_DATA is available but f_type in struct statfs is not. [ruby-dev:48154] [Bug #9789] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-24suppress warnings: assigned but unused variable - posnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-24call to_inaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-23skip on SEEK_HOLEnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-23check Linux versionnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-23fix typonaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-23check whther ext4+ or notnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-22check statfs and skipnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-22refix the point is seeknaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-22show what filesystem it is on failurenaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-22test_io.rb: test with holesnobu
* test/ruby/test_io.rb (test_seek, test_seek_symwhence): add tests of SEEK_DATA and SEEK_HOLE with holes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-04* test/ruby: get rid of warnings.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-18test_io.rb: duplicated testnobu
* test/ruby/test_io.rb (test_s_write): merge duplicated test. * test/ruby/test_io.rb (test_io_s_write): remove duplicated assertsions git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-17* test/ruby/test_io.rb: fix duplicated test name.ktsj
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16class.c: fix option hashnobu
* class.c (rb_scan_args): if no keywords is given return nil as the option hash. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16test_io.rb: IO.write testnobu
* test/ruby/test_io.rb (test_s_write): test for IO.write. more conditions will be needed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13test/ruby: better assertionsnobu
* test/ruby: use better assertions instead of mere assert. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-09test/unit/assertions.rb: return exceptionnobu
* lib/test/unit/assertions.rb (assert_raise_with_message): return raised exception same as assert_raise. * test/ruby, test/-ext-: use assert_raise_with_message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e