Patchwork [3,of,5] tests: fold test-template-filters.t into test-template-functions.t

login
register
mail settings
Submitter Yuya Nishihara
Date June 22, 2018, 12:48 p.m.
Message ID <a0475b5cf7e97f1f0ba3.1529671695@mimosa>
Download mbox | patch
Permalink /patch/32373/
State Accepted
Headers show

Comments

Yuya Nishihara - June 22, 2018, 12:48 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1529125812 -32400
#      Sat Jun 16 14:10:12 2018 +0900
# Node ID a0475b5cf7e97f1f0ba3b2d4a4b8d3a302f574ad
# Parent  4b7b595793e962935f4672e23a139f1c5e8260a8
tests: fold test-template-filters.t into test-template-functions.t

Patch

diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist
--- a/contrib/python3-whitelist
+++ b/contrib/python3-whitelist
@@ -489,7 +489,6 @@  test-symlink-placeholder.t
 test-symlinks.t
 test-tag.t
 test-tags.t
-test-template-filters.t
 test-template-functions.t
 test-template-map.t
 test-transplant.t
diff --git a/tests/test-template-filters.t b/tests/test-template-filters.t
deleted file mode 100644
--- a/tests/test-template-filters.t
+++ /dev/null
@@ -1,23 +0,0 @@ 
-  $ hg debugtemplate '{""|splitlines|commondir}\n'
-  
-  $ hg debugtemplate '{"foo/bar\nfoo/baz\nfoo/foobar\n"|splitlines|commondir}\n'
-  foo
-  $ hg debugtemplate '{"foo/bar\nfoo/bar\n"|splitlines|commondir}\n'
-  foo
-  $ hg debugtemplate '{"/foo/bar\n/foo/bar\n"|splitlines|commondir}\n'
-  foo
-  $ hg debugtemplate '{"/foo\n/foo\n"|splitlines|commondir}\n'
-  
-  $ hg debugtemplate '{"foo/bar\nbar/baz"|splitlines|commondir}\n'
-  
-  $ hg debugtemplate '{"foo/bar\nbar/baz\nbar/foo\n"|splitlines|commondir}\n'
-  
-  $ hg debugtemplate '{"foo/../bar\nfoo/bar"|splitlines|commondir}\n'
-  foo
-  $ hg debugtemplate '{"foo\n/foo"|splitlines|commondir}\n'
-  
-  $ hg init
-  $ hg log -r null -T '{rev|commondir}'
-  hg: parse error: argument is not a list of text
-  (template filter 'commondir' is not compatible with keyword 'rev')
-  [255]
diff --git a/tests/test-template-functions.t b/tests/test-template-functions.t
--- a/tests/test-template-functions.t
+++ b/tests/test-template-functions.t
@@ -216,6 +216,32 @@  Filename filters:
   $ hg debugtemplate '{"foo/bar"|stripdir}|{"foo/"|stripdir}|{"foo"|stripdir}|\n'
   foo|foo|foo|
 
+commondir() filter:
+
+  $ hg debugtemplate '{""|splitlines|commondir}\n'
+  
+  $ hg debugtemplate '{"foo/bar\nfoo/baz\nfoo/foobar\n"|splitlines|commondir}\n'
+  foo
+  $ hg debugtemplate '{"foo/bar\nfoo/bar\n"|splitlines|commondir}\n'
+  foo
+  $ hg debugtemplate '{"/foo/bar\n/foo/bar\n"|splitlines|commondir}\n'
+  foo
+  $ hg debugtemplate '{"/foo\n/foo\n"|splitlines|commondir}\n'
+  
+  $ hg debugtemplate '{"foo/bar\nbar/baz"|splitlines|commondir}\n'
+  
+  $ hg debugtemplate '{"foo/bar\nbar/baz\nbar/foo\n"|splitlines|commondir}\n'
+  
+  $ hg debugtemplate '{"foo/../bar\nfoo/bar"|splitlines|commondir}\n'
+  foo
+  $ hg debugtemplate '{"foo\n/foo"|splitlines|commondir}\n'
+  
+
+  $ hg log -r null -T '{rev|commondir}'
+  hg: parse error: argument is not a list of text
+  (template filter 'commondir' is not compatible with keyword 'rev')
+  [255]
+
 Add a dummy commit to make up for the instability of the above:
 
   $ echo a > a