# HG changeset patch # User Christian Ebert # Date 1322011232 0 # Node ID ab16e060541e87e63372eedc67b89b2d1a1b4029 # Parent a08af90d2bcce359d4ae4142d0f631a0dc982f14 test-keyword: use inline doctest syntax diff -r a08af90d2bcc -r ab16e060541e tests/test-keyword.t --- a/tests/test-keyword.t Mon Nov 21 11:52:11 2011 +0000 +++ b/tests/test-keyword.t Wed Nov 23 01:20:32 2011 +0000 @@ -309,8 +309,10 @@ record chunk - $ python -c \ - > 'l=open("a").readlines();l.insert(1,"foo\n");l.append("bar\n");open("a","w").writelines(l);' + >>> lines = open('a').readlines() + >>> lines.insert(1, 'foo\n') + >>> lines.append('bar\n') + >>> open('a', 'w').writelines(lines) $ hg record -d '1 10' -m rectest a< y > y @@ -809,8 +811,9 @@ Imported patch should not be rejected - $ python -c \ - > 'import re; s=re.sub("(Id.*)","\\1 rejecttest",open("a").read()); open("a","wb").write(s);' + >>> import re + >>> text = re.sub(r'(Id.*)', r'\1 rejecttest', open('a').read()) + >>> open('a', 'wb').write(text) $ hg --debug commit -m'rejects?' -d '3 0' -u 'User Name ' a overwriting a expanding keywords