OSDN Git Service

Make the home_directory test a little more resilient.
authorZachary Turner <zturner@google.com>
Wed, 22 Mar 2017 16:30:06 +0000 (16:30 +0000)
committerZachary Turner <zturner@google.com>
Wed, 22 Mar 2017 16:30:06 +0000 (16:30 +0000)
commitc5caccf493e1d8b95196eef8bdf2057705e792a5
treefb44909d6f502f41ebff0960c222357de75f8291
parent2811bb8f724311c21631ea86cb15281e0c52c06b
Make the home_directory test a little more resilient.

It's possible (albeit strange) for $HOME to intentionally
point somewhere other than the user's home directory as
reported by the password database.  Our test shouldn't fail
in this case.  This patch updates the test to pull directly
from the password database before unsetting $HOME, rather
than comparing the return value of home_directory() to the
original value of the environment variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298514 91177308-0d34-0410-b5e6-96231b3b80d8
unittests/Support/Path.cpp