tests/test-command-template.t
changeset 25662 ff5172c83002
parent 25597 fd5bc660c9f0
parent 25638 6047b60cdd09
child 25695 ce3d4b858420
equal deleted inserted replaced
25661:20de1ace07a9 25662:ff5172c83002
  2847   >
  2847   >
  2848   <>\n<[>
  2848   <>\n<[>
  2849   <>\n<]>
  2849   <>\n<]>
  2850   <>\n<
  2850   <>\n<
  2851 
  2851 
       
  2852 Test string escaping of quotes:
       
  2853 
       
  2854   $ hg log -Ra -r0 -T '{"\""}\n'
       
  2855   "
       
  2856   $ hg log -Ra -r0 -T '{"\\\""}\n'
       
  2857   \"
       
  2858   $ hg log -Ra -r0 -T '{r"\""}\n'
       
  2859   \"
       
  2860   $ hg log -Ra -r0 -T '{r"\\\""}\n'
       
  2861   \\\"
       
  2862 
  2852 Test exception in quoted template. single backslash before quotation mark is
  2863 Test exception in quoted template. single backslash before quotation mark is
  2853 stripped before parsing:
  2864 stripped before parsing:
  2854 
  2865 
  2855   $ cat <<'EOF' > escquotetmpl
  2866   $ cat <<'EOF' > escquotetmpl
  2856   > changeset = "\" \\" \\\" \\\\" {files % \"{file}\"}\n"
  2867   > changeset = "\" \\" \\\" \\\\" {files % \"{file}\"}\n"
  3119   Ancestor: 1
  3130   Ancestor: 1
  3120   
  3131   
  3121   Rev: 0
  3132   Rev: 0
  3122   Ancestor: 0
  3133   Ancestor: 0
  3123   
  3134   
       
  3135   $ hg log --template '{revset("TIP"|lower)}\n' -l1
       
  3136   2
       
  3137 
  3124 Test active bookmark templating
  3138 Test active bookmark templating
  3125 
  3139 
  3126   $ hg book foo
  3140   $ hg book foo
  3127   $ hg book bar
  3141   $ hg book bar
  3128   $ hg log --template "{rev} {bookmarks % '{bookmark}{ifeq(bookmark, active, \"*\")} '}\n"
  3142   $ hg log --template "{rev} {bookmarks % '{bookmark}{ifeq(bookmark, active, \"*\")} '}\n"