]> git.saurik.com Git - apt.git/blobdiff - test/libapt/fileutl_test.cc
add flAbsPath() as a wrapper to realpath()
[apt.git] / test / libapt / fileutl_test.cc
index 643c02297fbc2e8851775cceb84fb36582beea9f..9c7e1630a3d22d8f8d1decceb58fdccb01acf390 100644 (file)
@@ -224,3 +224,10 @@ TEST(FileUtlTest, GetTempDir)
    if (old_tmpdir.empty() == false)
       setenv("TMPDIR", old_tmpdir.c_str(), 1);
 }
+TEST(FileUtlTest, flAbsPath)
+{
+   int res = chdir("/bin/");
+   EXPECT_EQ(res, 0);
+   std::string p = flAbsPath("ls");
+   EXPECT_EQ(p, "/bin/ls");
+}