comparison tests/test-template-basic.t @ 40942:e48fdeb08c77

py3: fix bad escapes of sub() replacement pattern in test-template-basic.t Python 3.7 starts complaining about it. We have to double the backslash or '\x5c' to get around.
author Yuya Nishihara <yuya@tcha.org>
date Fri, 14 Dec 2018 21:19:19 +0900
parents ff8b2886c492
children fc4fb2f17dd4
comparison
equal deleted inserted replaced
40941:db6cace18765 40942:e48fdeb08c77
858 $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", "\x5c\x786e"))}\n' 858 $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", "\x5c\x786e"))}\n'
859 fourth\x6esecond\x6ethird 859 fourth\x6esecond\x6ethird
860 $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", r"\x5c\x786e"))}\n' 860 $ hg log -R a -r 8 --template '{join(files, ifeq(branch, "default", r"\x5c\x786e"))}\n'
861 fourth\x5c\x786esecond\x5c\x786ethird 861 fourth\x5c\x786esecond\x5c\x786ethird
862 862
863 $ hg log -R a -r 3:4 --template '{rev}:{sub(if("1", "\x6e"), ifeq(branch, "foo", r"\x5c\x786e", "\x5c\x786e"), desc)}\n' 863 $ hg log -R a -r 3:4 --template '{rev}:{sub(if("1", "\x6e"), ifeq(branch, "foo", r"\\x5c\\x786e", "\x5c\x5c\x786e"), desc)}\n'
864 3:\x6eo user, \x6eo domai\x6e 864 3:\x6eo user, \x6eo domai\x6e
865 4:\x5c\x786eew bra\x5c\x786ech 865 4:\x5c\x786eew bra\x5c\x786ech
866 866
867 Test quotes in nested expression are evaluated just like a $(command) 867 Test quotes in nested expression are evaluated just like a $(command)
868 substitution in POSIX shells: 868 substitution in POSIX shells: