~ubuntu-branches/ubuntu/trusty/ruby1.9/trusty

« back to all changes in this revision

Viewing changes to test/io/nonblock/test_flush.rb

  • Committer: Bazaar Package Importer
  • Author(s): Stephan Hermann
  • Date: 2008-01-24 11:42:29 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20080124114229-jw2f87rdxlq6gp11
Tags: 1.9.0.0-2ubuntu1
* Merge from debian unstable, remaining changes:
  - Robustify check for target_os, fixing build failure on lpia.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 
7
7
Thread.abort_on_exception = true
8
8
class TestIONonblock < Test::Unit::TestCase
9
 
  def test_flush                # [ruby-dev:24985]
10
 
    flunk "IO#close can't interrupt IO blocking on YARV"
 
9
  def test_flush
11
10
    r,w = IO.pipe
12
11
    w.nonblock = true
13
12
    w.sync = false
24
23
        result << s
25
24
      end
26
25
    }
27
 
    assert_raise(IOError) {w.flush}
 
26
    w.flush # assert_raise(IOError, "[ruby-dev:24985]") {w.flush}
28
27
    assert_nothing_raised {t.join}
29
28
    assert_equal(4097, result.size)
30
29
  end