X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/8e0002ac420707b94a8a43dfedea7fc182dd5851..eed65c79322c3c79facdea44ce39033b21972e36:/test/libapt/fileutl_test.cc?ds=sidebyside 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); }