From 6f1fe1d559795af5cf283003232b32b22dbc2121 Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 13 Jul 2010 21:31:17 +0000 Subject: [PATCH] Test for the awesome let's-silently-overwrite-local-files bug. --- regress/usr.bin/cvs/Makefile | 20 ++++++++++++++++++-- 1 file 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 and # Tobias Stoeckmann . @@ -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} -- 2.20.1