diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2020-06-26 07:55:58 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2020-06-26 07:55:58 +0000 |
commit | 5b69a6551901d7ac944a5296415e4cdda820624e (patch) | |
tree | 0c5d2af0869c8ba174ff3f7a2d4915b587964149 /regress/usr.bin/rcs | |
parent | 5a4cd5a6befac10e619f740310c8ef14d92db632 (diff) |
Add an OpenRCS regression test for merging files which lack newlines.
Diffstat (limited to 'regress/usr.bin/rcs')
-rw-r--r-- | regress/usr.bin/rcs/Makefile | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/regress/usr.bin/rcs/Makefile b/regress/usr.bin/rcs/Makefile index 66003eaa744..defadaeeeff 100644 --- a/regress/usr.bin/rcs/Makefile +++ b/regress/usr.bin/rcs/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.42 2016/09/29 05:58:22 otto Exp $ +# $OpenBSD: Makefile,v 1.43 2020/06/26 07:55:57 stsp 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 merge-noeol.out test test,v \ test-truncated truncated.out foo foo,v bar bar,v # XXX - These may need to be done in order. @@ -46,6 +46,7 @@ LTESTS= ci-initial \ rcsdiff \ rcsdiff-symbols \ merge-eflag \ + merge-noeol \ rcsmerge \ rcsmerge-symbols \ ci-dflag \ @@ -247,6 +248,36 @@ test-merge-eflag: clean @${MERGE} -p -q -e file1 file2 file3 | \ ${DIFF} ${.CURDIR}/merge-eflag.out - +test-merge-noeol: clean + @echo "<<<<<<< file1\nline1=======\nline3\n>>>>>>> file3" \ + > merge-noeol.out + @echo -n "line1" > file1 + @echo "line2" > file2 + @echo "line3" > file3 + @${MERGE} -p -q file1 file2 file3 | \ + ${DIFF} ${.CURDIR}/merge-noeol.out - + @echo "<<<<<<< file1\nline1\n=======\nline3\n>>>>>>> file3" \ + > merge-noeol.out + @echo "line1" > file1 + @echo -n "line2" > file2 + @echo "line3" > file3 + @${MERGE} -p -q file1 file2 file3 | \ + ${DIFF} ${.CURDIR}/merge-noeol.out - + @echo "<<<<<<< file1\nline1\n=======\nline3>>>>>>> file3" \ + > merge-noeol.out + @echo "line1" > file1 + @echo "line2" > file2 + @echo -n "line3" > file3 + @${MERGE} -p -q file1 file2 file3 | \ + ${DIFF} ${.CURDIR}/merge-noeol.out - + @echo "<<<<<<< file1\nline1=======\nline3>>>>>>> file3" \ + > merge-noeol.out + @echo -n "line1" > file1 + @echo -n "line2" > file2 + @echo -n "line3" > file3 + @${MERGE} -p -q file1 file2 file3 | \ + ${DIFF} ${.CURDIR}/merge-noeol.out - + test-rcsmerge: @cp -f ${.CURDIR}/rev1 blah.c @echo "descr" | ${CI} -q -l -m"first rev" blah.c |