summaryrefslogtreecommitdiff
path: root/test/TestUriUtil.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2019-08-09 15:54:13 +0200
committerMax Kellermann <max@musicpd.org>2019-08-09 20:21:12 +0200
commit40a288085769e83354d619500721911561b16f26 (patch)
treef6c049d0e2f6f1f20440a70dba4a49ac42f680e9 /test/TestUriUtil.cxx
parentade712d7117cec59f7daba80d983238de3ce305a (diff)
util/UriUtil: split
Diffstat (limited to 'test/TestUriUtil.cxx')
-rw-r--r--test/TestUriUtil.cxx26
1 files changed, 0 insertions, 26 deletions
diff --git a/test/TestUriUtil.cxx b/test/TestUriUtil.cxx
index 21cbd2cdf..17a6189e9 100644
--- a/test/TestUriUtil.cxx
+++ b/test/TestUriUtil.cxx
@@ -6,32 +6,6 @@
#include <gtest/gtest.h>
-TEST(UriUtil, Suffix)
-{
- EXPECT_EQ((const char *)nullptr, uri_get_suffix("/foo/bar"));
- EXPECT_EQ((const char *)nullptr, uri_get_suffix("/foo.jpg/bar"));
- EXPECT_STREQ(uri_get_suffix("/foo/bar.jpg"), "jpg");
- EXPECT_STREQ(uri_get_suffix("/foo.png/bar.jpg"), "jpg");
- EXPECT_EQ((const char *)nullptr, uri_get_suffix(".jpg"));
- EXPECT_EQ((const char *)nullptr, uri_get_suffix("/foo/.jpg"));
-
- /* the first overload does not eliminate the query
- string */
- EXPECT_STREQ(uri_get_suffix("/foo/bar.jpg?query_string"),
- "jpg?query_string");
-
- /* ... but the second one does */
- UriSuffixBuffer buffer;
- EXPECT_STREQ(uri_get_suffix("/foo/bar.jpg?query_string", buffer),
- "jpg");
-
- /* repeat some of the above tests with the second overload */
- EXPECT_EQ((const char *)nullptr, uri_get_suffix("/foo/bar", buffer));
- EXPECT_EQ((const char *)nullptr,
- uri_get_suffix("/foo.jpg/bar", buffer));
- EXPECT_STREQ(uri_get_suffix("/foo/bar.jpg", buffer), "jpg");
-}
-
TEST(UriUtil, RemoveAuth)
{
EXPECT_EQ(std::string(),