tests/test-xdg.t
author Matt Harbison <matt_harbison@yahoo.com>
Wed, 05 May 2021 17:47:30 -0400
branchstable
changeset 47182 dff19fe2973c
parent 32429 7d8da7b54dc0
child 51607 a4b3b8dee0a8
permissions -rw-r--r--
run-tests: fix whitelist/blacklist with directories on Windows The file name is resolved with `os.path.relpath()` in the `Test` constructor, which yields `\` on Windows. That doesn't match the `/` separator when using MSYS tools to build the list, and it isn't obvious that this is the problem because directory separators can mostly be used interchangeably. The `--test-list` argument already seems to be properly handled.

#if no-windows no-osx

  $ mkdir -p xdgconf/hg
  $ echo '[ui]' > xdgconf/hg/hgrc
  $ echo 'username = foobar' >> xdgconf/hg/hgrc
  $ XDG_CONFIG_HOME="`pwd`/xdgconf" ; export XDG_CONFIG_HOME
  $ unset HGRCPATH
  $ hg config ui.username 2>/dev/null
  foobar

#endif