# HG changeset patch # User Greg Ward # Date 1241393909 14400 # Node ID 932e7868404308c2d9b8ab0f6ea980189b663ece # Parent 1fd08644b5aca62c62187a7e50d18dfea59a5de9 Add (failing) tests for apparent parser bugs (unhandled syntax). Remove reminder comment from test-fastimport-anonbranch. diff -r 1fd08644b5ac -r 932e78684043 tests/test-fastimport-anonbranch --- a/tests/test-fastimport-anonbranch Sat May 02 18:08:56 2009 -0400 +++ b/tests/test-fastimport-anonbranch Sun May 03 19:38:29 2009 -0400 @@ -101,12 +101,8 @@ data 10 blah blah - __EOF__ -# XXX crash if blank line after "merge" command missing, but -# git-fast-import(1) says it's optional - set -e echo "% import" rm -rf anonbranch diff -r 1fd08644b5ac -r 932e78684043 tests/test-fastimport-syntax --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-fastimport-syntax Sun May 03 19:38:29 2009 -0400 @@ -0,0 +1,57 @@ +#!/bin/sh + +# Probe the corners of fastimport syntax to make sure our +# parser is up to scratch. + +. $TESTDIR/fastimport-common + +echo "% dump with no newline after merge commit" +cat > test1.dump <<__EOF__ +# rev 0 +commit refs/heads/master +mark :1 +committer Example 1200000000 +0000 +data 0 + +# rev 1 +commit refs/heads/master +mark :2 +committer Example 1200000001 +0000 +data 0 + +# rev 2 (merge 0 + 1) +commit refs/heads/master +mark :3 +committer Example 1200000002 +0000 +data 0 +from :1 +merge :2 +__EOF__ + +hg init test1 +cd test1 +hg fastimport ../test1.dump +hg glog --template "{rev}:{node|short}\n{desc}\n\n" +cd .. + +echo "% dump with redundant 'from' directive" +cat > test2.dump <<__EOF__ +# rev 0 +commit refs/heads/master +mark :1 +committer Example 1200000000 +0000 +data 0 + +# rev 1 +commit refs/heads/master +mark :2 +committer Example 1200000001 +0000 +data 0 +from :1 + +__EOF__ + +hg init test2 +cd test2 +hg fastimport ../test2.dump +hg glog --template "{rev}:{node|short}\n{desc}\n\n"