From 9d7db4cf4f2305b123c96a47ccb1ddc231023b21 Mon Sep 17 00:00:00 2001 From: Lasse Bigum Date: Sun, 3 Nov 2013 01:52:34 +0100 Subject: [PATCH] Add frontend MPD tests for 'search comment "foo"' --- tests/frontends/mpd/protocol/music_db_test.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/frontends/mpd/protocol/music_db_test.py b/tests/frontends/mpd/protocol/music_db_test.py index 0f6bbf10..3e0439e6 100644 --- a/tests/frontends/mpd/protocol/music_db_test.py +++ b/tests/frontends/mpd/protocol/music_db_test.py @@ -952,6 +952,18 @@ class MusicDatabaseSearchTest(protocol.BaseTestCase): self.sendRequest('search "date" ""') self.assertInResponse('OK') + def test_search_comment(self): + self.sendRequest('search "comment" "acomment"') + self.assertInResponse('OK') + + def test_search_comment_without_quotes(self): + self.sendRequest('search comment "acomment"') + self.assertInResponse('OK') + + def test_search_comment_without_filter_value(self): + self.sendRequest('search "comment" ""') + self.assertInResponse('OK') + def test_search_else_should_fail(self): self.sendRequest('search "sometype" "something"') self.assertEqualResponse('ACK [2@0] {search} incorrect arguments')