# HG changeset patch # User Christian Ebert # Date 1186667667 -7200 # Node ID 65a01675a9442ed2b6b938919a6c302fbb2c80b3 # Parent f956a8301c257396b698f521d4a275d540b52c76 Test that pattern does not span more than 1 line diff -r f956a8301c25 -r 65a01675a944 tests/test-keyword --- a/tests/test-keyword Thu Aug 09 14:20:03 2007 +0200 +++ b/tests/test-keyword Thu Aug 09 15:54:27 2007 +0200 @@ -29,6 +29,8 @@ hg kwshrink echo 'expand $Id$' > a +echo 'do not process $Id:' >> a +echo 'xxx $' >> a echo 'ignore $Id$' > b echo % cat cat a b diff -r f956a8301c25 -r 65a01675a944 tests/test-keyword.out --- a/tests/test-keyword.out Thu Aug 09 14:20:03 2007 +0200 +++ b/tests/test-keyword.out Thu Aug 09 15:54:27 2007 +0200 @@ -68,6 +68,8 @@ abort: no revision checked out! % cat expand $Id$ +do not process $Id: +xxx $ ignore $Id$ % default keyword expansion % commit @@ -78,28 +80,38 @@ overwriting a expanding keywords % status % identify -65cbcc9534b0 +7f0665a496fd % cat -expand $Id: a,v 65cbcc9534b0 1970/01/01 00:00:00 user $ +expand $Id: a,v 7f0665a496fd 1970/01/01 00:00:00 user $ +do not process $Id: +xxx $ ignore $Id$ % hg cat -expand $Id: a,v 65cbcc9534b0 1970/01/01 00:00:00 user $ +expand $Id: a,v 7f0665a496fd 1970/01/01 00:00:00 user $ +do not process $Id: +xxx $ ignore $Id$ % touch % status % update 2 files updated, 0 files merged, 0 files removed, 0 files unresolved % cat -expand $Id: a,v 65cbcc9534b0 1970/01/01 00:00:00 user $ +expand $Id: a,v 7f0665a496fd 1970/01/01 00:00:00 user $ +do not process $Id: +xxx $ ignore $Id$ % copy % commit c - c: copy a:e6cc15c9eb5fd3c09ec691b667cf6ccd6dfb936e + c: copy a:0045e12f6c5791aac80ca6cbfd97709a88307292 overwriting c expanding keywords % cat a c -expand $Id: a,v 65cbcc9534b0 1970/01/01 00:00:00 user $ -expand $Id: c,v 9460ba56f8d0 1970/01/01 00:00:01 user $ +expand $Id: a,v 7f0665a496fd 1970/01/01 00:00:00 user $ +do not process $Id: +xxx $ +expand $Id: c,v 6a127771f5db 1970/01/01 00:00:01 user $ +do not process $Id: +xxx $ % touch copied c % status % rollback @@ -120,10 +132,14 @@ Xinfo = {author}: {desc} $Xinfo: test: hg keyword config and expansion example $ % cat -expand $Id: a,v 65cbcc9534b0 1970/01/01 00:00:00 user $ +expand $Id: a,v 7f0665a496fd 1970/01/01 00:00:00 user $ +do not process $Id: +xxx $ ignore $Id$ % hg cat -expand $Id: a 65cbcc9534b0 Thu, 01 Jan 1970 00:00:00 +0000 user $ +expand $Id: a 7f0665a496fd Thu, 01 Jan 1970 00:00:00 +0000 user $ +do not process $Id: +xxx $ ignore $Id$ % interrupted commit transaction abort! @@ -136,11 +152,15 @@ overwriting a expanding keywords % status % cat -expand $Id: a 6ade9dd7b017 Thu, 01 Jan 1970 00:00:02 +0000 user $ +expand $Id: a 576a35651b0a Thu, 01 Jan 1970 00:00:02 +0000 user $ +do not process $Id: +xxx $ $Xinfo: User Name : firstline $ ignore $Id$ % hg cat -expand $Id: a 6ade9dd7b017 Thu, 01 Jan 1970 00:00:02 +0000 user $ +expand $Id: a 576a35651b0a Thu, 01 Jan 1970 00:00:02 +0000 user $ +do not process $Id: +xxx $ $Xinfo: User Name : firstline $ ignore $Id$ % remove @@ -151,7 +171,9 @@ R a % revert a % cat a -expand $Id: a 6ade9dd7b017 Thu, 01 Jan 1970 00:00:02 +0000 user $ +expand $Id: a 576a35651b0a Thu, 01 Jan 1970 00:00:02 +0000 user $ +do not process $Id: +xxx $ $Xinfo: User Name : firstline $ % clone to test incoming requesting all changes @@ -162,7 +184,7 @@ 2 files updated, 0 files merged, 0 files removed, 0 files unresolved % incoming searching for changes -changeset: 1:6ade9dd7b017 +changeset: 1:576a35651b0a tag: tip user: User Name date: Thu Jan 01 00:00:02 1970 +0000 @@ -173,17 +195,25 @@ overwriting a shrinking keywords % cat expand $Id$ +do not process $Id: +xxx $ $Xinfo$ ignore $Id$ % hg cat -expand $Id: a 6ade9dd7b017 Thu, 01 Jan 1970 00:00:02 +0000 user $ +expand $Id: a 576a35651b0a Thu, 01 Jan 1970 00:00:02 +0000 user $ +do not process $Id: +xxx $ $Xinfo: User Name : firstline $ ignore $Id$ % cat expand $Id$ +do not process $Id: +xxx $ $Xinfo$ ignore $Id$ % hg cat expand $Id$ +do not process $Id: +xxx $ $Xinfo$ ignore $Id$