diff options
Diffstat (limited to 'tests/test-command-template.t')
-rw-r--r-- | tests/test-command-template.t | 33 |
1 files changed, 5 insertions, 28 deletions
diff --git a/tests/test-command-template.t b/tests/test-command-template.t index d3fa338..81989bd 100644 --- a/tests/test-command-template.t +++ b/tests/test-command-template.t @@ -43,15 +43,6 @@ Second branch starting at nullrev: $ hg mv second fourth $ hg commit -m third -d "2020-01-01 10:01" -Quoting for ui.logtemplate - - $ hg tip --config "ui.logtemplate={rev}\n" - 8 - $ hg tip --config "ui.logtemplate='{rev}\n'" - 8 - $ hg tip --config 'ui.logtemplate="{rev}\n"' - 8 - Make sure user/global hgrc does not affect tests $ echo '[ui]' > .hg/hgrc @@ -442,13 +433,11 @@ Test xml styles: Error if style not readable: -#if unix-permissions $ touch q $ chmod 0 q $ hg log --style ./q abort: Permission denied: ./q [255] -#endif Error if no style: @@ -466,15 +455,13 @@ Error if style missing key: Error if include fails: $ echo 'changeset = q' >> t -#if unix-permissions $ hg log --style ./t abort: template file ./q: Permission denied [255] - $ rm q -#endif Include works: + $ rm q $ echo '{rev}' > q $ hg log --style ./t 8 @@ -1125,6 +1112,10 @@ Filters work: other user + $ hg log --template '{date|age}\n' > /dev/null || exit 1 + + $ hg log -l1 --template '{date|age}\n' + 8 years from now $ hg log --template '{date|date}\n' Wed Jan 01 10:01:00 2020 +0000 Mon Jan 12 13:46:40 1970 +0000 @@ -1227,20 +1218,6 @@ Formatnode filter works: $ hg --debug log -r 0 --template '{node|formatnode}\n' 1e4e1b8f71e05681d422154f5421e385fec3454f -Age filter: - - $ hg log --template '{date|age}\n' > /dev/null || exit 1 - - >>> from datetime import datetime - >>> fp = open('a', 'w') - >>> fp.write(str(datetime.now().year + 8) + '-01-01 00:00') - >>> fp.close() - $ hg add a - $ hg commit -m future -d "`cat a`" - - $ hg log -l1 --template '{date|age}\n' - 7 years from now - Error on syntax: $ echo 'x = "f' >> t |