From: Eric S. Raymond Date: Sat, 15 Nov 2014 21:09:15 +0000 (-0500) Subject: Regression test for branch deletion. All tests pass. X-Git-Tag: 0.9~20 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=ca3d6365987e84538cf528ff155629d49587a2bb;p=src.git Regression test for branch deletion. All tests pass. --- diff --git a/src b/src index 1ed78a2..11ff43c 100755 --- a/src +++ b/src @@ -1007,6 +1007,8 @@ def tag_helper(args, legend, validation_hook, delete_method, set_method): for arg in ctx.args: metadata = History(arg) if name not in metadata.symbols: + croak("in %s, %s is not a symbol" % (arg, name)) + elif backend.isbranch(metadata.symbols[name]) != (legend == "branch"): croak("in %s, %s is not a %s" % (arg, name, legend)) else: with backend.lifter(arg): diff --git a/srctest b/srctest index b20bb73..5099841 100755 --- a/srctest +++ b/srctest @@ -577,14 +577,14 @@ src $TESTOPTS status newname1 newname2 >tryit diff -u statuslog tryit check "status after ignore" -src $TESTOPTS branch delete GORP sample +src $TESTOPTS branch delete trunk sample check "branch delete" cat >newlist <tryit @@ -593,31 +593,31 @@ check "branch list check after delete" delete cat >newlog <tryit diff -u newlog tryit check "content after branch deletion" +echo "srctest: all tests succeeded" + rm -fr $SANDBOX # end