| 201 | #endif |
| 202 | |
| 203 | void TFileTest::TestLocale() { |
| 204 | #ifdef _unix_ |
| 205 | const char* loc = setlocale(LC_CTYPE, nullptr); |
| 206 | setlocale(LC_CTYPE, "ru_RU.UTF-8"); |
| 207 | #endif |
| 208 | TFile f("Имя.txt", CreateNew); |
| 209 | UNIT_ASSERT(f.IsOpen()); |
| 210 | UNIT_ASSERT_VALUES_EQUAL(f.GetName(), "Имя.txt"); |
| 211 | UNIT_ASSERT_VALUES_EQUAL(f.GetLength(), 0); |
| 212 | f.Close(); |
| 213 | UNIT_ASSERT(NFs::Remove("Имя.txt")); |
| 214 | #ifdef _unix_ |
| 215 | setlocale(LC_CTYPE, loc); |
| 216 | #endif |
| 217 | } |
| 218 | |
| 219 | void TFileTest::TestFlush() { |
| 220 | TTempFile tmp("tmp"); |