mirror of
https://github.com/fmang/opustags.git
synced 2025-07-10 11:15:10 +02:00
some more tests for Tags
it needs to be a multimap
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
|
||||
using namespace opustags;
|
||||
|
||||
TEST_CASE("Tag manipulation test")
|
||||
TEST_CASE("Tag manipulation test", "[tags]")
|
||||
{
|
||||
SECTION("Basic operations") {
|
||||
Tags tags;
|
||||
@ -39,4 +39,19 @@ TEST_CASE("Tag manipulation test")
|
||||
REQUIRE(std::get<0>(tags.get_all()[1]) == "y");
|
||||
REQUIRE(std::get<0>(tags.get_all()[2]) == "gamma");
|
||||
}
|
||||
|
||||
SECTION("Key to multiple values") {
|
||||
// ARTIST is set once per artist.
|
||||
// https://www.xiph.org/vorbis/doc/v-comment.html
|
||||
Tags tags;
|
||||
tags.set("ARTIST", "You");
|
||||
tags.set("ARTIST", "Me");
|
||||
REQUIRE(tags.get_all().size() == 2);
|
||||
}
|
||||
|
||||
SECTION("Raw set") {
|
||||
Tags tags;
|
||||
tags.set("TITLE=Foo=Bar");
|
||||
REQUIRE(tags.get("TITLE") == "Foo=Bar");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user