diff options
author | Ilya Zverev <zverik@textual.ru> | 2016-06-21 18:48:36 +0300 |
---|---|---|
committer | Ilya Zverev <zverik@textual.ru> | 2016-06-28 15:19:13 +0300 |
commit | 3fac0435788352bd5cdc67764d9f17b59cbdf501 (patch) | |
tree | 81eb4e3dcc0f18be3d33527a3d7338a4e98e835a /base/base_tests | |
parent | fb53332984f36004d6ff4e3acbc7cb07d9fec3e9 (diff) |
[booking] Save all translations we've got
Diffstat (limited to 'base/base_tests')
-rw-r--r-- | base/base_tests/string_utils_test.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/base/base_tests/string_utils_test.cpp b/base/base_tests/string_utils_test.cpp index 1f1aa05bc2..49720cc45b 100644 --- a/base/base_tests/string_utils_test.cpp +++ b/base/base_tests/string_utils_test.cpp @@ -729,3 +729,17 @@ UNIT_TEST(NormalizeDigits_UniString) TEST_EQUAL(nd("a0192 "), "a0192 ", ()); TEST_EQUAL(nd("3456789"), "3456789", ()); } + +UNIT_TEST(Split) +{ + vector<string> target; + strings::Split(";Test\\;проверка;0;", ';', target); + vector<string> expected({"", "Test\\", "проверка", "0", ""}); + TEST_EQUAL(target, expected, ()); + strings::Split("and there was none", ' ', target); + vector<string> expected2({"and", "there", "", "was", "none"}); + TEST_EQUAL(target, expected2, ()); + strings::Split("", '!', target); + vector<string> expected3; + TEST_EQUAL(target, expected3, ()); +} |