summaryrefslogtreecommitdiff
path: root/test/libapt
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2014-04-28 17:24:35 +0200
committerMichael Vogt <mvo@ubuntu.com>2014-04-28 17:24:35 +0200
commit53ac87ac9c27af39df062516aab5dce880af107a (patch)
tree6074a64724348e9c19faaef983d646ad028b57ac /test/libapt
parenta298a1dc595c548e6c10b48b8e69d987e5be1c42 (diff)
add flAbsPath() as a wrapper to realpath()
Diffstat (limited to 'test/libapt')
-rw-r--r--test/libapt/fileutl_test.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/libapt/fileutl_test.cc b/test/libapt/fileutl_test.cc
index 643c02297..9c7e1630a 100644
--- a/test/libapt/fileutl_test.cc
+++ b/test/libapt/fileutl_test.cc
@@ -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");
+}