| 31 | }; |
| 32 | |
| 33 | Y_UNIT_TEST(TestStrip) { |
| 34 | for (const auto& test : StripTests) { |
| 35 | TString inputStr(test.Str); |
| 36 | |
| 37 | TString s; |
| 38 | Strip(inputStr, s); |
| 39 | UNIT_ASSERT_VALUES_EQUAL(s, test.StripRes); |
| 40 | |
| 41 | UNIT_ASSERT_VALUES_EQUAL(StripString(inputStr), test.StripRes); |
| 42 | UNIT_ASSERT_VALUES_EQUAL(StripStringLeft(inputStr), test.StripLeftRes); |
| 43 | UNIT_ASSERT_VALUES_EQUAL(StripStringRight(inputStr), test.StripRightRes); |
| 44 | |
| 45 | TStringBuf inputStrBuf(test.Str); |
| 46 | UNIT_ASSERT_VALUES_EQUAL(StripString(inputStrBuf), test.StripRes); |
| 47 | UNIT_ASSERT_VALUES_EQUAL(StripStringLeft(inputStrBuf), test.StripLeftRes); |
| 48 | UNIT_ASSERT_VALUES_EQUAL(StripStringRight(inputStrBuf), test.StripRightRes); |
| 49 | }; |
| 50 | } |
| 51 | |
| 52 | Y_UNIT_TEST(TestStripInPlace) { |
| 53 | // On Darwin default locale is set to a value which interprets certain cyrillic utf-8 sequences as spaces. |
nothing calls this directly
no test coverage detected