]> thyrsus.com Git - src.git/commitdiff
Support "make check"
authorEric S. Raymond <esr@thyrsus.com>
Fri, 7 Nov 2014 17:07:43 +0000 (12:07 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Fri, 7 Nov 2014 17:07:43 +0000 (12:07 -0500)
Makefile
srctest

index 867adf44e8971c08e13ad00b6c73a40a7f6435d3..e6a5117aeb8c59ee6eb5e6e03d5ee13cdb2879a8 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,9 @@ SOURCES = README COPYING NEWS src src.asc Makefile control
 
 all: src.1
 
+check:
+       srctest
+
 .SUFFIXES: .html .asc .txt .1
 
 # Requires asciidoc and xsltproc/docbook stylesheets.
diff --git a/srctest b/srctest
index 2dd968e703478ad6c2f11842c5917fa15e25656e..c763edf8ff01ad1af197f5ae99ca50eadadc36f5 100755 (executable)
--- a/srctest
+++ b/srctest
@@ -22,10 +22,18 @@ EOF
 src add testfile$$ >/dev/null
 check "add"
 
-src commit -m "First comment" >/dev/null testfile$$
+src commit -m "First comment" testfile$$ >/dev/null
 check "commit"
 
-src cat testfile$$ | diff testfile$$ - >/dev/null 
+src cat testfile$$ | diff testfile$$ - >/dev/null
 check "diff"
 
+cat >testfile$$ <<EOF
+Now is the time
+for all good men
+EOF
+
+echo "Second comment" | src commit -m - testfile$$ >/dev/null
+check "commit"
+
 # end