ソースを参照

Merge branch 'feature/abspath' into feature/apt-install-deb

Michael Vogt 12 年 前
コミット
713ee8ad3f
共有1 個のファイルを変更した4 個の追加0 個の削除を含む
  1. 4 0
      test/libapt/fileutl_test.cc

+ 4 - 0
test/libapt/fileutl_test.cc

@@ -273,8 +273,12 @@ TEST(FileUtlTest, Popen)
 }
 }
 TEST(FileUtlTest, flAbsPath)
 TEST(FileUtlTest, flAbsPath)
 {
 {
+   std::string cwd = SafeGetCWD();
    int res = chdir("/bin/");
    int res = chdir("/bin/");
    EXPECT_EQ(res, 0);
    EXPECT_EQ(res, 0);
    std::string p = flAbsPath("ls");
    std::string p = flAbsPath("ls");
    EXPECT_EQ(p, "/bin/ls");
    EXPECT_EQ(p, "/bin/ls");
+
+   res = chdir(cwd.c_str());
+   EXPECT_EQ(res, 0);
 }
 }