tests/test-command-template.t
changeset 25509 576d6c74784b
parent 25490 ad14fb602e5e
child 25580 a69983942fb4
equal deleted inserted replaced
25508:b8fd605b0c88 25509:576d6c74784b
  3040   $ hg log --template '{pad(rev, 20, "-", False)} {author|user}\n'
  3040   $ hg log --template '{pad(rev, 20, "-", False)} {author|user}\n'
  3041   2------------------- test
  3041   2------------------- test
  3042   1------------------- {node|short}
  3042   1------------------- {node|short}
  3043   0------------------- test
  3043   0------------------- test
  3044 
  3044 
       
  3045 Test template string in pad function
       
  3046 
       
  3047   $ hg log -r 0 -T '{pad("\{{rev}}", 10)} {author|user}\n'
       
  3048   {0}        test
       
  3049 
       
  3050   $ hg log -r 0 -T '{pad(r"\{rev}", 10)} {author|user}\n'
       
  3051   \0         test
       
  3052 
  3045 Test ifcontains function
  3053 Test ifcontains function
  3046 
  3054 
  3047   $ hg log --template '{rev} {ifcontains(rev, "2 two 0", "is in the string", "is not")}\n'
  3055   $ hg log --template '{rev} {ifcontains(rev, "2 two 0", "is in the string", "is not")}\n'
  3048   2 is in the string
  3056   2 is in the string
  3049   1 is not
  3057   1 is not