aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/tests/tests.cc
diff options
context:
space:
mode:
authorTobias Pflug <tobias.pflug@gmail.com>2020-05-08 15:07:40 +0200
committerTobias Pflug <tobias.pflug@gmail.com>2020-05-08 15:07:40 +0200
commit2191141274cfefcb9ffbafbbfcdc58414fb28f1a (patch)
tree365f3478eea6ec860a9e66220b97dedfe1eb9e3e /src/libutil/tests/tests.cc
parente3df9c2a6e867d0e038cb26af40501511607e007 (diff)
Enable `baseNameOf` test
Add note about removal of trailing slashes in the doc comment of baseNameOf and enabled the test.
Diffstat (limited to 'src/libutil/tests/tests.cc')
-rw-r--r--src/libutil/tests/tests.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libutil/tests/tests.cc b/src/libutil/tests/tests.cc
index 1b016430d..d46f6a5a4 100644
--- a/src/libutil/tests/tests.cc
+++ b/src/libutil/tests/tests.cc
@@ -127,11 +127,9 @@ namespace nix {
ASSERT_EQ(p1, "");
}
- // XXX: according to the doc of `baseNameOf`, baseNameOf("/dir/") should return
- // "" but it actually returns "dir"
- TEST(baseNameOf, DISABLED_trailingSlash) {
+ TEST(baseNameOf, trailingSlash) {
auto p1 = baseNameOf("/dir/");
- ASSERT_EQ(p1, "");
+ ASSERT_EQ(p1, "dir");
}
/* ----------------------------------------------------------------------------