Add test for fileName() without parent directories

charconv
Martchus 3 years ago
parent 53b4cbd8e9
commit e1313c77a0
  1. 1
      tests/iotests.cpp

@ -265,6 +265,7 @@ void IoTests::testPathUtilities()
CPPUNIT_ASSERT_EQUAL("libc++utilities.so"s, fileName("C:\\libs\\libc++utilities.so"));
CPPUNIT_ASSERT_EQUAL("libc++utilities.so"s, fileName("C:\\libs/libc++utilities.so"));
CPPUNIT_ASSERT_EQUAL("libc++utilities.so"s, fileName("/usr/lib/libc++utilities.so"));
CPPUNIT_ASSERT_EQUAL("libc++utilities.so"s, fileName("libc++utilities.so"));
CPPUNIT_ASSERT_EQUAL("/usr/lib/"s, directory("/usr/lib/libc++utilities.so"));
CPPUNIT_ASSERT_EQUAL(string(), directory("libc++utilities.so"));
CPPUNIT_ASSERT_EQUAL("C:\\libs\\"s, directory("C:\\libs\\libc++utilities.so"));

Loading…
Cancel
Save