]> thyrsus.com Git - src.git/commitdiff
Regression tests for list and log succeeded.
authorEric S. Raymond <esr@thyrsus.com>
Fri, 7 Nov 2014 18:01:09 +0000 (13:01 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Fri, 7 Nov 2014 18:01:09 +0000 (13:01 -0500)
src
srctest

diff --git a/src b/src
index a9299b72ef082ae62f44512e74808c29439f8e70..306ce56856fce46278e6cbbfa40776e929e09cb5 100755 (executable)
--- a/src
+++ b/src
@@ -8,8 +8,11 @@ version=0.1
 
 def screenwidth():
     "Return the current width of the terminal window."
-    with popen_or_die(b'stty size', b"rb") as tp:
-        return int(tp.read().split()[1])
+    if pseudotime:
+        return 79
+    else:
+        with popen_or_die(b'stty size', b"rb") as tp:
+            return int(tp.read().split()[1])
 
 def rfc3339(t):
     "RFC3339 string from Unix time."
diff --git a/srctest b/srctest
index 585ad72b95425fdbc1792035461a02bfb19772e9..c5db2b86c7f8b6b8ff7956c0d04af08930eb848a 100755 (executable)
--- a/srctest
+++ b/srctest
@@ -42,14 +42,30 @@ src $TESTOPTS cat testfile1 | diff testfile1 -
 check "content check after second commit"
 
 cat >testfile2 <<EOF
-= testfile1 =====================================================================
+= testfile1 =================================================================
 2     * 1970-01-02T00:01:00Z Second comment
 1     - 1970-01-02T00:02:00Z First comment
 EOF
 
 src $TESTOPTS list testfile1 >testfile3
-
 diff testfile2 testfile3
 check "list test"
 
+cat >testfile2 <<EOF
+= testfile1 =================================================================
+2    | 1970-01-02T00:01:00Z
+Second comment
+------------------------------------------------------------------------------
+1    | 1970-01-02T00:02:00Z
+First comment
+------------------------------------------------------------------------------
+EOF
+
+src $TESTOPTS log testfile1 >testfile3
+diff testfile2 testfile3
+check "log test"
+
+
+
+
 # end