mirror of
https://github.com/pocoproject/poco.git
synced 2025-04-23 00:48:52 +02:00
.bashrc exists only with bash shell while .profile exists always
Signed-off-by: FrancisANDRE <zosrothko@orange.fr>
This commit is contained in:
parent
df61181582
commit
bc22588895
@ -1511,15 +1511,15 @@ void PathTest::testForDirectory()
|
|||||||
void PathTest::testExpand()
|
void PathTest::testExpand()
|
||||||
{
|
{
|
||||||
#if defined(POCO_OS_FAMILY_UNIX)
|
#if defined(POCO_OS_FAMILY_UNIX)
|
||||||
std::string s = Path::expand("~/.bashrc");
|
std::string s = Path::expand("~/.profile");
|
||||||
assert (s == Path::expand("$HOME/.bashrc"));
|
assert (s == Path::expand("$HOME/.profile"));
|
||||||
assert (s == Environment::get("HOME") + "/.bashrc" ||
|
assert (s == Environment::get("HOME") + "/.profile" ||
|
||||||
s == Environment::get("HOME") + "//.bashrc");
|
s == Environment::get("HOME") + "//.profile");
|
||||||
Path p(s);
|
Path p(s);
|
||||||
s = Path::expand("$HOME/.bashrc");
|
s = Path::expand("$HOME/.profile");
|
||||||
assert (s == Path::expand("~/.bashrc"));
|
assert (s == Path::expand("~/.profile"));
|
||||||
s = Path::expand("${HOME}/.bashrc");
|
s = Path::expand("${HOME}/.profile");
|
||||||
assert (s == Path::expand("~/.bashrc"));
|
assert (s == Path::expand("~/.profile"));
|
||||||
#elif defined(POCO_OS_FAMILY_WINDOWS)
|
#elif defined(POCO_OS_FAMILY_WINDOWS)
|
||||||
std::string s = Path::expand("%TMP%\\foo");
|
std::string s = Path::expand("%TMP%\\foo");
|
||||||
assert (s == Environment::get("TMP") + "\\foo");
|
assert (s == Environment::get("TMP") + "\\foo");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user