Gracefully handle subtleties of util_expand() of `~' and `~user'.
authorLeonardo Taccari <iamleot@gmail.com>
Mon, 15 Oct 2018 15:31:53 +0000 (17:31 +0200)
committerLeonardo Taccari <iamleot@gmail.com>
Mon, 15 Oct 2018 15:31:53 +0000 (17:31 +0200)
commitda6c5f85d56e715a2e4486387056920be06b3f23
tree7761203c7b6ba6e6e77ff54421dee4e43e4f2af0
parent99f7810d1034b057f77bec4ae57ec080992ad9a9
Gracefully handle subtleties of util_expand() of `~' and `~user'.

When `~' is expanded to an home directory without any user, g_get_home_dir()
function is used that on Unix systems first try to honor HOME and fall back to
the passwd file if not set.

On the other hand, `~user' is expanded always by checking the passwd
file.  Adjust test_expand_tilde_user() accordingly.
tests/test-util.c