list_tags: add a test to ensure full scan works

it'd require some effort to craft a file where this option matters, but at
least we want to make sure the full scan code is run once so we know it doesn't
crash

close #11
This commit is contained in:
Frédéric Mangano 2016-04-06 10:07:41 +02:00
parent 76bf95a74c
commit dad987a8da

View File

@ -155,3 +155,15 @@ TEST_CASE("listing tags", "[actions]")
REQUIRE(lister.languages[0] == "und");
REQUIRE(lister.languages[1] == "und");
}
TEST_CASE("listing tags, full scan", "[actions]")
{
std::ifstream in("../tests/samples/mystery-beep.ogg");
ogg::Decoder dec(in);
GetLanguages lister;
list_tags(dec, lister, true);
REQUIRE(lister.languages.size() == 2);
REQUIRE(lister.languages[0] == "und");
REQUIRE(lister.languages[1] == "und");
}