]> thyrsus.com Git - src.git/commitdiff
Out-of-bounds revision check.
authorEric S. Raymond <esr@thyrsus.com>
Fri, 7 Nov 2014 21:49:49 +0000 (16:49 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Fri, 7 Nov 2014 21:49:49 +0000 (16:49 -0500)
src
srctest

diff --git a/src b/src
index 8068be579916c8620d2d2505712e442af7efb940..cb3050039f5605bc411be06796ad2da0eec63793 100755 (executable)
--- a/src
+++ b/src
@@ -22,6 +22,7 @@ def announce(msg):
     sys.stdout.write("src: " + msg + "\n")
 
 def croak(msg):
+    sys.stdout.flush()
     sys.stderr.write("src: " + msg + "\n")
     sys.exit(1)
 
diff --git a/srctest b/srctest
index 781ae3755ae9be62392b7ee1d22226d8e51e121e..d9c45719f46ff008ae2224cfee7609994fbf0bf4 100755 (executable)
--- a/srctest
+++ b/srctest
@@ -97,7 +97,14 @@ src $TESTOPTS log testfile1 >testfile5
 diff testfile4 testfile5
 check "3-commit log test"
 
-#src list 5 testfile1
+cat >testfile6 <<EOF
+= testfile1 =================================================================
+src: testfile1 has no 5 revision
+EOF
+
+src $TESTOPTS list 5 testfile1 >testfile7 2>&1
+diff testfile6 testfile7
+check "oob revision spec check"
 
 # to do: checkout, tag, fast-export