diff options
author | methodus <methodus@web.de> | 2012-09-16 12:23:24 +0200 |
---|---|---|
committer | methodus <methodus@web.de> | 2012-09-16 12:23:24 +0200 |
commit | 17468ec33af5487448db193bfd88ad56b31e7c7a (patch) | |
tree | 123ce243dd20f545289f46a570993bbd98b7005d /tests | |
parent | 43bb44211d9e33b2a82f0bcee78b184430b8dd4c (diff) | |
download | vdr-plugin-upnp-17468ec33af5487448db193bfd88ad56b31e7c7a.tar.gz vdr-plugin-upnp-17468ec33af5487448db193bfd88ad56b31e7c7a.tar.bz2 |
Fixed some bugs in the FilterCriteria parser.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_parser.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/test_parser.cpp b/tests/test_parser.cpp index 68b2fb0..8e3053a 100644 --- a/tests/test_parser.cpp +++ b/tests/test_parser.cpp @@ -19,6 +19,18 @@ void checkSearch(string t, string e) { } +void checkFilter(string f){ + + upnp::StringList list = upnp::cFilterCriteria::parse(f); + + cout << "Filter: \"" << f << "\"" << endl; + for(upnp::StringList::iterator it = list.begin(); it != list.end(); ++it){ + cout << " " << (*it) << endl; + } + cout << endl; + +} + int main(){ checkSearch("upnp:class = \"object.item.imageItem\" and ( dc:date >= \"2001-10-01\" and dc:date <= \"2001-10-31\" )", "class == 'object.item.imageItem' AND ( date >= '2001-10-01' AND date <= '2001-10-31' ) "); @@ -32,5 +44,11 @@ int main(){ checkSearch("upnp:class derivedfrom \"object.container.album\"", "class LIKE '%object.container.album%' "); + checkFilter("@id,@parentID,@restricted,dc:title"); + + checkFilter("*"); + + checkFilter("@id,dc:title,upnp:longDescription,res"); + return 0; } |