Skip to content

Commit

Permalink
Add some stem() and extension() test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Beman committed Nov 2, 2016
1 parent c8f1b16 commit 2f4b634
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/path_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -772,13 +772,19 @@ namespace
BOOST_TEST(path("..").filename() == "..");

// stem() tests not otherwise covered
BOOST_TEST(path(".").stem() == ".");
BOOST_TEST(path("..").stem() == "..");
BOOST_TEST(path(".a").stem() == "");
BOOST_TEST(path("b").stem() == "b");
BOOST_TEST(path("a/b.txt").stem() == "b");
BOOST_TEST(path("a/b.").stem() == "b");
BOOST_TEST(path("a.b.c").stem() == "a.b");
BOOST_TEST(path("a.b.c.").stem() == "a.b.c");

// extension() tests not otherwise covered
BOOST_TEST(path(".").extension() == "");
BOOST_TEST(path("..").extension() == "");
BOOST_TEST(path(".a").extension() == ".a");
BOOST_TEST(path("a/b").extension() == "");
BOOST_TEST(path("a.b/c").extension() == "");
BOOST_TEST(path("a/b.txt").extension() == ".txt");
Expand Down

0 comments on commit 2f4b634

Please sign in to comment.