aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/tests
diff options
context:
space:
mode:
authorTobias Pflug <tobias.pflug@gmail.com>2020-05-08 15:03:44 +0200
committerTobias Pflug <tobias.pflug@gmail.com>2020-05-08 15:03:44 +0200
commite3df9c2a6e867d0e038cb26af40501511607e007 (patch)
tree26dc2563d225790083e6713a7e2818908d627f81 /src/libutil/tests
parent5b8883faac0cff928a4359b4260b5be09a311d4b (diff)
Enable `dirOf` test
Adjusted the doc comment for `dirOf` to reflect the implementation behavior.
Diffstat (limited to 'src/libutil/tests')
-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 0fb4411e8..1b016430d 100644
--- a/src/libutil/tests/tests.cc
+++ b/src/libutil/tests/tests.cc
@@ -86,12 +86,10 @@ namespace nix {
* dirOf
* --------------------------------------------------------------------------*/
- // XXX: according to the doc of `dirOf`, dirOf("/") and dirOf("/foo")
- // should both return "" but it actually returns "/" in both cases
- TEST(dirOf, DISABLED_returnsEmptyStringForRoot) {
+ TEST(dirOf, returnsEmptyStringForRoot) {
auto p = dirOf("/");
- ASSERT_EQ(p, "");
+ ASSERT_EQ(p, "/");
}
TEST(dirOf, returnsFirstPathComponent) {