summaryrefslogtreecommitdiff
path: root/test/libapt
diff options
context:
space:
mode:
Diffstat (limited to 'test/libapt')
-rw-r--r--test/libapt/fileutl_test.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/libapt/fileutl_test.cc b/test/libapt/fileutl_test.cc
index 16ea6cf2b..cdf7ea479 100644
--- a/test/libapt/fileutl_test.cc
+++ b/test/libapt/fileutl_test.cc
@@ -273,8 +273,12 @@ TEST(FileUtlTest, Popen)
}
TEST(FileUtlTest, flAbsPath)
{
+ std::string cwd = SafeGetCWD();
int res = chdir("/bin/");
EXPECT_EQ(res, 0);
std::string p = flAbsPath("ls");
EXPECT_EQ(p, "/bin/ls");
+
+ res = chdir(cwd.c_str());
+ EXPECT_EQ(res, 0);
}