view tests/test-template-filters.t @ 38202:45765264ae3a

spartan: add missing closing tags Browsers apparently don't care about this, but let's fix it for humans.
author Anton Shestakov <av6@dwimlabs.net>
date Thu, 31 May 2018 16:52:02 +0800
parents 56dd15178190
children fabfbbf4dee2
line wrap: on
line source

  $ hg debugtemplate '{""|splitlines|commonprefix}\n'
  
  $ hg debugtemplate '{"foo/bar\nfoo/baz\nfoo/foobar\n"|splitlines|commonprefix}\n'
  foo
  $ hg debugtemplate '{"foo/bar\nfoo/bar\n"|splitlines|commonprefix}\n'
  foo
  $ hg debugtemplate '{"/foo/bar\n/foo/bar\n"|splitlines|commonprefix}\n'
  foo
  $ hg debugtemplate '{"/foo\n/foo\n"|splitlines|commonprefix}\n'
  
  $ hg debugtemplate '{"foo/bar\nbar/baz"|splitlines|commonprefix}\n'
  
  $ hg debugtemplate '{"foo/bar\nbar/baz\nbar/foo\n"|splitlines|commonprefix}\n'
  
  $ hg debugtemplate '{"foo/../bar\nfoo/bar"|splitlines|commonprefix}\n'
  foo
  $ hg debugtemplate '{"foo\n/foo"|splitlines|commonprefix}\n'
  
  $ hg init
  $ hg log -r null -T '{rev|commonprefix}'
  hg: parse error: argument is not a list of text
  (template filter 'commonprefix' is not compatible with keyword 'rev')
  [255]