mirror of
https://github.com/pocoproject/poco.git
synced 2025-04-16 23:12:57 +02:00
use TMPDIR for unix path expansion test
This commit is contained in:
parent
900426e52b
commit
8cdd129d7e
@ -375,13 +375,13 @@ void PathTest::testParseUnix5()
|
|||||||
|
|
||||||
void PathTest::testExpandUnix()
|
void PathTest::testExpandUnix()
|
||||||
{
|
{
|
||||||
std::string pathWithOutVar = "/usr/share/O1\\$\\$/folder";
|
std::string pathWithoutVar = "/usr/share/O1\\$\\$/folder";
|
||||||
std::string pathWithVar = "${PWD}/folder";
|
std::string pathWithVar = "${TMPDIR}folder";
|
||||||
Path p;
|
Path p;
|
||||||
std::string s = p.expand(pathWithOutVar);
|
std::string s = p.expand(pathWithoutVar);
|
||||||
assert (s == "/usr/share/O1$$/folder");
|
assert (s == "/usr/share/O1$$/folder");
|
||||||
s = p.expand(pathWithVar);
|
s = p.expand(pathWithVar);
|
||||||
Path tmpPath = Path::current();
|
Path tmpPath = Path::temp();
|
||||||
tmpPath.append("folder");
|
tmpPath.append("folder");
|
||||||
assert (s == tmpPath.toString());
|
assert (s == tmpPath.toString());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user