]> git.saurik.com Git - apt.git/blobdiff - test/libapt/fileutl_test.cc
Use _apt as our unprivileged user name
[apt.git] / test / libapt / fileutl_test.cc
index 16ea6cf2bdb9c0de6b48cf2e56101dc412652e01..cdf7ea479a75bf276ce3f58237c4fa859d464b30 100644 (file)
@@ -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);
 }