diff options
author | Eric Wong <e@80x24.org> | 2019-12-20 01:39:14 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2020-01-06 08:15:13 +0000 |
commit | 940c0b3cffa7f691620e7890ada15c7519817307 (patch) | |
tree | 50674c3892983abdb78fa2a8597865edf6b05c79 /test | |
parent | 044d1e1777f37a77084794fadce86b4865a1ccfc (diff) | |
download | dtas-940c0b3cffa7f691620e7890ada15c7519817307.tar.gz |
sleepy_penguin requires a compiler and development headers to install, so it could be a PITA to install for users on distro-provided Ruby. Allow fiddle since it's part of the Ruby standard library since 1.9.2 and users won't have to install anything else.
Diffstat (limited to 'test')
-rw-r--r-- | test/test_sigevent.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/test_sigevent.rb b/test/test_sigevent.rb new file mode 100644 index 0000000..6cfe528 --- /dev/null +++ b/test/test_sigevent.rb @@ -0,0 +1,20 @@ +# Copyright (C) 2019 all contributors <dtas-all@nongnu.org> +# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt> +# frozen_string_literal: true +require_relative 'helper' +require 'dtas' +require 'dtas/sigevent' + +class TestSigevent < Testcase + def test_sigevent + io = DTAS::Sigevent.new + io.signal + assert IO.select([io]), 'IO.select returns' + res = io.readable_iter do |f,arg| + assert_same io, f + assert_nil arg + end + assert_equal :wait_readable, res + assert_nil io.close + end +end |