]> git.saurik.com Git - apt.git/commitdiff
fix tests
authorMichael Vogt <mvo@ubuntu.com>
Mon, 28 Apr 2014 15:44:34 +0000 (17:44 +0200)
committerMichael Vogt <mvo@ubuntu.com>
Mon, 28 Apr 2014 15:44:34 +0000 (17:44 +0200)
test/libapt/fileutl_test.cc

index 9c7e1630a3d22d8f8d1decceb58fdccb01acf390..15b57983beaef51b79560eb2ea5d387c4e4b3c68 100644 (file)
@@ -226,8 +226,12 @@ TEST(FileUtlTest, GetTempDir)
 }
 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);
 }