X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/4e3180ff00ae32e4d836517180137048ac3cdfc7..e6f0c9bca4b052d20a2e48ce9715b89e187b671a:/test/libapt/fileutl_test.cc diff --git a/test/libapt/fileutl_test.cc b/test/libapt/fileutl_test.cc index c2a43eda7..cdf7ea479 100644 --- a/test/libapt/fileutl_test.cc +++ b/test/libapt/fileutl_test.cc @@ -224,7 +224,6 @@ TEST(FileUtlTest, GetTempDir) if (old_tmpdir.empty() == false) setenv("TMPDIR", old_tmpdir.c_str(), 1); } - TEST(FileUtlTest, Popen) { FileFd Fd; @@ -272,3 +271,14 @@ TEST(FileUtlTest, Popen) Fd.Close(); ExecWait(Child, "PopenWrite"); } +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); +}