summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2010-07-13 21:31:18 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2010-07-13 21:31:18 +0000
commitbd55e2da7955bdfa3a187b122e9e2964181949f9 (patch)
tree77c8ddcc340a37d40216dda7456aad9628ab7c0e /regress
parent2f0a75f42daae58af1f5d58fe8aa898825c9f92a (diff)
Test for the awesome let's-silently-overwrite-local-files bug.
Diffstat (limited to 'regress')
-rw-r--r--regress/usr.bin/cvs/Makefile20
1 files changed, 18 insertions, 2 deletions
diff --git a/regress/usr.bin/cvs/Makefile b/regress/usr.bin/cvs/Makefile
index 96e2081a0dc..7fb78d22526 100644
--- a/regress/usr.bin/cvs/Makefile
+++ b/regress/usr.bin/cvs/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.27 2010/07/13 20:47:56 nicm Exp $
+# $OpenBSD: Makefile,v 1.28 2010/07/13 21:31:17 nicm Exp $
# Regression tests by Niall O'Higgins <niallo@openbsd.org> and
# Tobias Stoeckmann <tobias@openbsd.org>.
@@ -66,7 +66,7 @@ LTESTS= cvs-initial \
cvs-rlog \
cvs-rtag-one_more_branch \
cvs-export \
- cvs-merge
+ cvs-update-with-local
# Known to fail.
# cvs-update-for_subdir
# cvs-release-dflag
@@ -320,6 +320,22 @@ test-cvs-merge:
@echo "modified text" > ${REGRESS_WCOPY}/b/seed/seed1.txt
@cd ${REGRESS_WCOPY}/b/seed && test `${CVSCMD} -q up | wc -l` -eq 0
+test-cvs-update-with-local:
+ @rm -rf ${REGRESS_WCOPY}
+ @mkdir -p ${REGRESS_WCOPY}/a ${REGRESS_WCOPY}/b
+ @cd ${REGRESS_WCOPY}/a; \
+ ${CVSCMD} -Q -d ${MYCVSROOT} co seed > /dev/null
+ @cd ${REGRESS_WCOPY}/b; \
+ ${CVSCMD} -Q -d ${MYCVSROOT} co seed > /dev/null
+ @echo "new file" > ${REGRESS_WCOPY}/a/seed/test.txt
+ @cd ${REGRESS_WCOPY}/a/seed && \
+ ${CVSCMD} -Q add test.txt > /dev/null && \
+ ${CVSCMD} -Q com -m 'a' > /dev/null;
+ @echo "local file" > ${REGRESS_WCOPY}/b/seed/test.txt
+ @cd ${REGRESS_WCOPY}/b/seed && \
+ ${CVSCMD} -Q up 2>&1|grep -q '^C test.txt' && \
+ grep -q '^local file' test.txt
+
clean:
@rm -rf ${CLEANFILES}