1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 13:11:39 +01:00
Simon Atanasyan e970f782ec [unittests] Fix ExpandTilde test to match handling home dirs with trailing slash
The `expandTildeExpr` routine just replaces a tilde by a home dir path.
If the home dir has a trailing slash, the result of substitution will
contain double slashes. For example, `HOME=/foo/ ~/bar` gives `/foo//bar`.
That corresponds to (at least) Bash behaviour because the following
command `$HOME=/foo/ echo ~/bar` prints `/foo//bar`.

The `ExpandTilde` test constructs a path expected as the `fs::expand_tilde`
call result by calling `path::append` and the expected path has a single
slash. This patch fixes that and allows to pass the unittest on hosts where
the `HOME` is `/`.

Differential Revision: http://reviews.llvm.org/D54752

llvm-svn: 347346
2018-11-20 21:13:51 +00:00
..
2016-12-27 11:07:53 +00:00
2018-04-29 00:45:03 +00:00
2016-09-27 15:45:57 +00:00