summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiall O'Higgins <niallo@cvs.openbsd.org>2006-08-23 16:26:18 +0000
committerNiall O'Higgins <niallo@cvs.openbsd.org>2006-08-23 16:26:18 +0000
commit4e2b51fcaa7941bff38be8ad3312f237ede4d291 (patch)
tree6e7f2f819bb38b61e45f0e8ce66b00a7126633d1
parent05130d0bc84666ebe2381442c2cbdc0f00e88437 (diff)
- add regression test for rcs parser's handling of truncated files.
ok xsa@
-rw-r--r--regress/usr.bin/rcs/Makefile11
-rw-r--r--regress/usr.bin/rcs/test-truncated,v23
2 files changed, 32 insertions, 2 deletions
diff --git a/regress/usr.bin/rcs/Makefile b/regress/usr.bin/rcs/Makefile
index 2f736366fa9..6aa11d0195d 100644
--- a/regress/usr.bin/rcs/Makefile
+++ b/regress/usr.bin/rcs/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.35 2006/08/11 08:15:44 xsa Exp $
+# $OpenBSD: Makefile,v 1.36 2006/08/23 16:26:17 niallo Exp $
# Regression tests by Niall O'Higgins <niallo@openbsd.org>.
# ksh -> Makefile by Ray Lai <ray@cyth.net>.
@@ -15,7 +15,7 @@ RLOG?= rlog
DIFF= diff -u
CLEANFILES= RCS blah.c blah.c,v description file1 file2 file3 \
- file file,v newfile newfile,v test test,v
+ file file,v newfile newfile,v test test,v test-truncated truncated.out
# XXX - These may need to be done in order.
# (At least start with ci-initial.)
@@ -71,6 +71,7 @@ LTESTS= ci-initial \
ci-keywords2 \
ci-parse-keywords \
ci-parse-keywords2 \
+ co-parse-truncated \
.for t in ${LTESTS}
REGRESS_TARGETS+=test-${t}
@@ -588,6 +589,12 @@ test-ci-parse-keywords2: clean
@echo '$Id: blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah' > test
@echo . | ${CI} -q -k test
+# Check for correct EOF handling in rcs parser
+test-co-parse-truncated: clean
+ @sh -c 'ulimit -d 1000 && ${CO} -q test-truncated > ${.CURDIR}/truncated.out 2>&1' || \
+ case "$$?" in 1) exit 0;; esac && exit 1
+ @grep -q 'co: problem parsing deltatexts' truncated.out
+
clean:
@rm -rf ${CLEANFILES}
diff --git a/regress/usr.bin/rcs/test-truncated,v b/regress/usr.bin/rcs/test-truncated,v
new file mode 100644
index 00000000000..2ffe0a276ab
--- /dev/null
+++ b/regress/usr.bin/rcs/test-truncated,v
@@ -0,0 +1,23 @@
+head 1.1;
+access;
+symbols;
+locks; strict;
+comment @# @;
+
+
+1.1
+date 2006.08.01.18.51.11; author niallo; state Exp;
+branches;
+next ;
+
+
+desc
+@@
+
+
+1.1
+log
+@Initial revision
+@
+text
+@d: blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah