use TMPDIR for unix path expansion test

This commit is contained in:
Alex Fabijanic 2017-08-14 12:58:30 -05:00
parent 900426e52b
commit 8cdd129d7e

View File

@ -375,13 +375,13 @@ void PathTest::testParseUnix5()
void PathTest::testExpandUnix()
{
std::string pathWithOutVar = "/usr/share/O1\\$\\$/folder";
std::string pathWithVar = "${PWD}/folder";
std::string pathWithoutVar = "/usr/share/O1\\$\\$/folder";
std::string pathWithVar = "${TMPDIR}folder";
Path p;
std::string s = p.expand(pathWithOutVar);
std::string s = p.expand(pathWithoutVar);
assert (s == "/usr/share/O1$$/folder");
s = p.expand(pathWithVar);
Path tmpPath = Path::current();
Path tmpPath = Path::temp();
tmpPath.append("folder");
assert (s == tmpPath.toString());
}