Add unit test for 7003255c0e (#4096)

This commit is contained in:
Artem Pavlenko 2019-11-05 09:53:41 +00:00
parent 7003255c0e
commit b84c414f2e

View file

@ -31,3 +31,18 @@ TEST_CASE("many punctuation chars")
CHECK(runs.getScriptEnd() == text.length());
}
}
TEST_CASE("empty runs")
{
mapnik::value_unicode_string text("()text");
ScriptRun runs(text.getBuffer(), text.length());
std::size_t count = 0;
std::size_t size = 0;
while (runs.next())
{
size += runs.getScriptEnd() - runs.getScriptStart();
++count;
}
REQUIRE(count == 1);
REQUIRE(size == text.length());
}