summaryrefslogtreecommitdiff
path: root/src/utils/translation/poparser_unittest.cc
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-10 20:31:26 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-10 20:31:26 +0300
commit011d09f618d890deffaeb79401690895bfbfaa92 (patch)
treee68321be976960c1f3d74fe9535c264b391eede7 /src/utils/translation/poparser_unittest.cc
parentdde9d0d8a9b803ed5e78797ebb5ab0db5fddf662 (diff)
downloadmanaplus-011d09f618d890deffaeb79401690895bfbfaa92.tar.gz
manaplus-011d09f618d890deffaeb79401690895bfbfaa92.tar.bz2
manaplus-011d09f618d890deffaeb79401690895bfbfaa92.tar.xz
manaplus-011d09f618d890deffaeb79401690895bfbfaa92.zip
Ignore fuzzy translations in poparser.
Diffstat (limited to 'src/utils/translation/poparser_unittest.cc')
-rw-r--r--src/utils/translation/poparser_unittest.cc18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/utils/translation/poparser_unittest.cc b/src/utils/translation/poparser_unittest.cc
index 5766f0789..1e1b527c1 100644
--- a/src/utils/translation/poparser_unittest.cc
+++ b/src/utils/translation/poparser_unittest.cc
@@ -65,7 +65,7 @@ TEST_CASE("PoParser tests", "PoParser")
REQUIRE(dict != nullptr);
REQUIRE(dict->getMap() != nullptr);
- REQUIRE(dict->getMap()->size() == 1787);
+ REQUIRE(dict->getMap()->size() == 1786);
REQUIRE(dict->getStr("Unknown skill message.") ==
"Неизвестная ошибка скилов.");
REQUIRE(dict->getStr("Full strip failed because of coating.") ==
@@ -76,4 +76,20 @@ TEST_CASE("PoParser tests", "PoParser")
delete parser;
delete dict;
}
+
+ SECTION("PoParser fuzzy")
+ {
+ PoParser *parser = new PoParser;
+ PoDict *dict = parser->load("ru",
+ "test/test1",
+ nullptr);
+
+ REQUIRE(dict != nullptr);
+ REQUIRE(dict->getMap() != nullptr);
+ REQUIRE(dict->getMap()->size() == 1786);
+ REQUIRE(dict->getStr("Atk +100%.") == "Atk +100%.");
+
+ delete parser;
+ delete dict;
+ }
}