diff options
author | Eric Wong <e@80x24.org> | 2016-01-22 11:10:57 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-01-22 11:10:57 +0000 |
commit | 250956d0df7c1f06843b0bc3a0c33ea9f2b2a642 (patch) | |
tree | a6c4833d619e22706d06189b210c73028e192124 /test/test_mpd_emu.rb | |
parent | ccbb0f705f6f29269e0e8964ecff484b73e62863 (diff) | |
download | dtas-250956d0df7c1f06843b0bc3a0c33ea9f2b2a642.tar.gz |
Diffstat (limited to 'test/test_mpd_emu.rb')
-rw-r--r-- | test/test_mpd_emu.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_mpd_emu.rb b/test/test_mpd_emu.rb index 869bff4..e536459 100644 --- a/test/test_mpd_emu.rb +++ b/test/test_mpd_emu.rb @@ -51,6 +51,14 @@ class TestMpdEmu < Testcase assert_nil @c.read(1) end + def test_bad_list_states + %w(command_list_end).each do |cmd| + @c.write "#{cmd}\n" + assert_equal %Q![5@0 {} unknown command "#{cmd}"\n!, @c.gets + assert_nil IO.select([@c], nil, nil, 0) + end + end + # to ensure output buffering works: module BigOutput WAKE = IO.pipe |