progname_ut.cpp 527 B

123456789101112131415161718
  1. #include "progname.h"
  2. #include <library/cpp/testing/unittest/registar.h>
  3. Y_UNIT_TEST_SUITE(TProgramNameTest) {
  4. Y_UNIT_TEST(TestIt) {
  5. TString progName = GetProgramName();
  6. try {
  7. UNIT_ASSERT(
  8. progName.find("ut_util") != TString::npos || progName.find("util-system_ut") != TString::npos || progName.find("util-system-ut") != TString::npos);
  9. } catch (...) {
  10. Cerr << progName << Endl;
  11. throw;
  12. }
  13. }
  14. } // Y_UNIT_TEST_SUITE(TProgramNameTest)