Make test more adaptive to different Hg versions
authorChristian Ebert <blacktrash@gmx.net>
Thu, 19 Jul 2007 04:07:20 +0200
changeset 202 e2a2f9ca8271
parent 201 e826c3cdc52d
child 203 20eaa6147391
Make test more adaptive to different Hg versions
tests/test-keyword
tests/test-keyword.out
--- a/tests/test-keyword	Thu Jul 19 03:43:20 2007 +0200
+++ b/tests/test-keyword	Thu Jul 19 04:07:20 2007 +0200
@@ -9,7 +9,8 @@
 EOF
 
 echo % help
-hg help keyword
+hg help keyword \
+| sed -e '/^list of commands:/d' -e '/hg -v help keyword/d' -e '/^$/d'
 
 echo % hg kwdemo
 hg --quiet kwdemo --default \
@@ -115,7 +116,7 @@
 EOF
 echo % incoming
 # remove path to temp dir
-hg incoming | sed -e 's/^\(comparing with \).*\(test-keyword.*\)/\1\2/'
+hg incoming | sed -e '/^comparing with/d'
 
 echo % switch off expansion
 cd ../Test
--- a/tests/test-keyword.out	Thu Jul 19 03:43:20 2007 +0200
+++ b/tests/test-keyword.out	Thu Jul 19 04:07:20 2007 +0200
@@ -1,52 +1,37 @@
 % help
 keyword extension - keyword expansion in local repositories
-
 This extension expands RCS/CVS-like or self-customized $Keywords$
 in the text files selected by your configuration.
-
 Keywords are only expanded in local repositories and not logged by
 Mercurial internally. The mechanism can be regarded as a convenience
 for the current user or archive distribution.
-
 Configuration is done in the [keyword] and [keywordmaps] sections of
 hgrc files.
-
 Example:
     [extensions]
     hgext.keyword =
-
     [keyword]
     # expand keywords in every python file except those matching "x*"
     **.py =
     x* = ignore
-
 Note: the more specific you are in your [keyword] filename patterns
       the less you lose speed in huge repos.
-
 For a [keywordmaps] template mapping and expansion demonstration
 run "hg kwdemo".
-
 An additional date template filter {date|utcdate} is provided.
-
 You can replace the default template mappings with customized keywords
 and templates of your choice.
 Again, run "hg kwdemo" to control the results of your config changes.
-
 When you change keyword configuration, especially the active keywords,
 and do not want to store expanded keywords in change history, run
 "hg kwshrink", and then change configuration.
-
 Expansions spanning more than one line and incremental exapansions
 (like CVS' $Log$) are not supported. A keyword template map
 "Log = {desc}" expands to the first line of the changeset description.
-
 Caveat: "hg import" fails if the patch context contains an active
         keyword. In that case run "hg kwshrink", reimport, and then
         "hg kwexpand".
         Or, better, use bundle/unbundle to share changes.
-
-list of commands (use "hg help -v keyword" to show aliases and global options):
-
  kwdemo     print [keywordmaps] configuration and an expansion example
  kwexpand   expand keywords in working directory
  kwshrink   revert expanded keywords in working directory