From 47c67a420210d56f5957e8e01c768382b7b9550c Mon Sep 17 00:00:00 2001 From: Veloman Yunkan Date: Sun, 7 Mar 2021 20:35:24 +0400 Subject: [PATCH] LibraryServerTest.catalog_search_with_word_exclusion --- test/server.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/server.cpp b/test/server.cpp index 6d1028bd1..e6df02474 100644 --- a/test/server.cpp +++ b/test/server.cpp @@ -809,6 +809,25 @@ TEST_F(LibraryServerTest, catalog_prefix_search) } } +TEST_F(LibraryServerTest, catalog_search_with_word_exclusion) +{ + const auto r = zfs1_->GET("/catalog/search?q=ray%20-uncategorized"); + EXPECT_EQ(r->status, 200); + EXPECT_EQ(maskVariableOPDSFeedData(r->body), + OPDS_FEED_TAG + " 12345678-90ab-cdef-1234-567890abcdef\n" + " Search result for ray -uncategorized\n" + " YYYY-MM-DDThh:mm:ssZ\n" + " 2\n" + " 0\n" + " 2\n" + CATALOG_LINK_TAGS + RAY_CHARLES_CATALOG_ENTRY + CHARLES_RAY_CATALOG_ENTRY + "\n" + ); +} + TEST_F(LibraryServerTest, catalog_search_by_tag) { const auto r = zfs1_->GET("/catalog/search?tag=_category:jazz");