comparison tests/test-help.t @ 33262:8e6f4939a69a

tests: replace yet more calls to `python` with $PYTHON These are some simple cases. More to come in a future change. Reviewers: krbullock Reviewed By: krbullock Differential Revision: https://phab.mercurial-scm.org/D4
author Augie Fackler <augie@google.com>
date Wed, 05 Jul 2017 11:10:11 -0500
parents 75be14993fda
children 67b42e64194d
comparison
equal deleted inserted replaced
33261:be49f3fdcd10 33262:8e6f4939a69a
1644 replacement makes message meaningless. 1644 replacement makes message meaningless.
1645 1645
1646 This tests that section lookup by translated string isn't broken by 1646 This tests that section lookup by translated string isn't broken by
1647 such str.lower(). 1647 such str.lower().
1648 1648
1649 $ python <<EOF 1649 $ $PYTHON <<EOF
1650 > def escape(s): 1650 > def escape(s):
1651 > return ''.join('\u%x' % ord(uc) for uc in s.decode('cp932')) 1651 > return ''.join('\u%x' % ord(uc) for uc in s.decode('cp932'))
1652 > # translation of "record" in ja_JP.cp932 1652 > # translation of "record" in ja_JP.cp932
1653 > upper = "\x8bL\x98^" 1653 > upper = "\x8bL\x98^"
1654 > # str.lower()-ed section name should be treated as different one 1654 > # str.lower()-ed section name should be treated as different one
1678 $ cat >> $HGRCPATH <<EOF 1678 $ cat >> $HGRCPATH <<EOF
1679 > [extensions] 1679 > [extensions]
1680 > ambiguous = ./ambiguous.py 1680 > ambiguous = ./ambiguous.py
1681 > EOF 1681 > EOF
1682 1682
1683 $ python <<EOF | sh 1683 $ $PYTHON <<EOF | sh
1684 > upper = "\x8bL\x98^" 1684 > upper = "\x8bL\x98^"
1685 > print "hg --encoding cp932 help -e ambiguous.%s" % upper 1685 > print "hg --encoding cp932 help -e ambiguous.%s" % upper
1686 > EOF 1686 > EOF
1687 \x8bL\x98^ (esc) 1687 \x8bL\x98^ (esc)
1688 ---- 1688 ----
1689 1689
1690 Upper name should show only this message 1690 Upper name should show only this message
1691 1691
1692 1692
1693 $ python <<EOF | sh 1693 $ $PYTHON <<EOF | sh
1694 > lower = "\x8bl\x98^" 1694 > lower = "\x8bl\x98^"
1695 > print "hg --encoding cp932 help -e ambiguous.%s" % lower 1695 > print "hg --encoding cp932 help -e ambiguous.%s" % lower
1696 > EOF 1696 > EOF
1697 \x8bl\x98^ (esc) 1697 \x8bl\x98^ (esc)
1698 ---- 1698 ----