tests/test-xdg.t
author Mads Kiilerich <mads@kiilerich.com>
Tue, 27 Jun 2023 10:09:11 +0200
branchstable
changeset 50753 a2df74853f8d
parent 32429 7d8da7b54dc0
child 51607 a4b3b8dee0a8
permissions -rw-r--r--
tests: fix sortdict doctest with Python 3.12 The output of OrderedDict changed to use plain dict syntax: $ python3.11 -c "import collections;print(collections.OrderedDict([('a', 0), ('b', 1)]))" OrderedDict([('a', 0), ('b', 1)]) $ python3.12 -c "import collections;print(collections.OrderedDict([('a', 0), ('b', 1)]))" OrderedDict({'a': 0, 'b': 1})

#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