mirror of
https://github.com/pocoproject/poco.git
synced 2025-04-16 06:56:41 +02:00
use TMPDIR for unix path expansion test
This commit is contained in:
parent
900426e52b
commit
8cdd129d7e
@ -370,18 +370,18 @@ void PathTest::testParseUnix5()
|
||||
assert (p[1] == "system32");
|
||||
assert (p.isDirectory());
|
||||
assert (!p.isFile());
|
||||
assert (p.toString(Path::PATH_UNIX) == "/c:/windows/system32/");
|
||||
assert (p.toString(Path::PATH_UNIX) == "/c:/windows/system32/");
|
||||
}
|
||||
|
||||
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());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user