Skip to content

Commit

Permalink
[utils][test] add new test URIUtils::HasExtension vector
Browse files Browse the repository at this point in the history
  • Loading branch information
AlwinEsch committed Sep 7, 2023
1 parent 0862cb4 commit 28adb8f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions xbmc/utils/test/TestURIUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ TEST_F(TestURIUtils, HasExtension)
EXPECT_FALSE(URIUtils::HasExtension("/path/movie.AvI", ".mpg|.mkv|.mp4"));
EXPECT_FALSE(URIUtils::HasExtension("/path.mkv/movie.AvI", ".mpg|.mkv|.mp4"));
EXPECT_FALSE(URIUtils::HasExtension("", ".avi|.mkv|.mp4"));

EXPECT_TRUE(URIUtils::HasExtension("/path/movie.AvI", {".avi", ".mkv", ".mp4"}));
EXPECT_TRUE(URIUtils::HasExtension("/path/movie.AvI", {".mkv", ".avi", ".mp4"}));
EXPECT_FALSE(URIUtils::HasExtension("/path/movie.AvI", {".mpg", ".mkv", ".mp4"}));
EXPECT_FALSE(URIUtils::HasExtension("/path.mkv/movie.AvI", {".mpg", ".mkv", ".mp4"}));
EXPECT_FALSE(URIUtils::HasExtension("", {".avi", ".mkv", ".mp4"}));
}

TEST_F(TestURIUtils, GetFileName)
Expand Down

0 comments on commit 28adb8f

Please sign in to comment.