From 53ac87ac9c27af39df062516aab5dce880af107a Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 28 Apr 2014 17:24:35 +0200 Subject: add flAbsPath() as a wrapper to realpath() --- test/libapt/fileutl_test.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/libapt/fileutl_test.cc') 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"); +} -- cgit v1.2.3