diff options
author | Eric Wong <e@yhbt.net> | 2010-11-18 13:38:32 -0800 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2010-11-18 13:48:57 -0800 |
commit | f1b497e601ed2acb54f75dc989d0a5ec7afebca0 (patch) | |
tree | e3b4341ff004c2720b9eeaaeac28b93c3efb87a6 /test | |
parent | 827ad6b4fba768a5cac8fb4e83fbbf61cf7a3194 (diff) | |
download | kgio-f1b497e601ed2acb54f75dc989d0a5ec7afebca0.tar.gz |
It makes it easier for people to use certain overrides without killing other methods. This is the first step in fixing problems people were having with dalli 0.11.1+ while running Unicorn.
Diffstat (limited to 'test')
-rw-r--r-- | test/test_default_wait.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/test_default_wait.rb b/test/test_default_wait.rb new file mode 100644 index 0000000..10033fe --- /dev/null +++ b/test/test_default_wait.rb @@ -0,0 +1,21 @@ +require 'test/unit' +require 'io/nonblock' +$-w = true +require 'kgio' + +class TestDefaultWait < Test::Unit::TestCase + + def test_socket_pair + a, b = Kgio::UNIXSocket.pair + assert_equal a, a.kgio_wait_writable + a.syswrite('.') + assert_equal b, b.kgio_wait_readable + end + + def test_pipe + a, b = Kgio::Pipe.new + assert_equal b, b.kgio_wait_writable + b.syswrite('.') + assert_equal a, a.kgio_wait_readable + end +end |