1# $OpenBSD: Makefile,v 1.46 2022/03/01 06:13:17 anton Exp $ 2 3# Regression tests by Niall O'Higgins <niallo@openbsd.org>. 4# ksh -> Makefile by Ray Lai <ray@cyth.net>. 5 6CI?= ci 7CO?= co 8MERGE?= merge 9RCS?= rcs 10RCSCLEAN?= rcsclean 11RCSDIFF?= rcsdiff 12RCSMERGE?= rcsmerge 13RLOG?= rlog 14 15DIFF= diff -u 16 17CLEANFILES= RCS blah.c blah.c,v description file1 file2 file3 \ 18 file file,v newfile newfile,v merge-noeol.out test test,v \ 19 test-truncated truncated.out foo foo,v bar bar,v 20 21# XXX - These may need to be done in order. 22# (At least start with ci-initial.) 23LTESTS= ci-initial \ 24 ci-mflag \ 25 ci-lflag \ 26 ci-rflag \ 27 co-lflag \ 28 ci-rev \ 29 co-perm \ 30 co-perm2 \ 31 ci-perm \ 32 ci-perm2 \ 33 ci-dinvalid \ 34 ci-dold \ 35 ci-wflag \ 36 rcsdiff-uflag \ 37 rcsdiff-rflag \ 38 rcs-mflag \ 39 rcs-mflag2 \ 40 co-RCSINIT \ 41 ci-nflag \ 42 ci-Nflag \ 43 ci-sflag \ 44 co-lflag2 \ 45 rcsclean \ 46 rcsdiff \ 47 rcsdiff-symbols \ 48 merge-eflag \ 49 merge-noeol \ 50 rcsmerge \ 51 rcsmerge-symbols \ 52 ci-dflag \ 53 ci-xflag \ 54 comma \ 55 rcs-aflag \ 56 rcs-eflag \ 57 rcs-Aflag \ 58 rcs-tflag-stdin \ 59 rcs-tflag-stdin2 \ 60 rcs-tflag-stdin3 \ 61 rcs-tflag-inline \ 62 rcs-tflag-file \ 63 rcs-oflag \ 64 rcs-lock-unlock \ 65 co-lock-filemodes \ 66 co-unlock-filemodes \ 67 ci-filemodes \ 68 rcs-iflag \ 69 rlog-lflag \ 70 rlog-rflag \ 71 ci-nofile \ 72 ci-revert \ 73 ci-keywords \ 74 ci-keywords2 \ 75 ci-parse-keywords \ 76 ci-parse-keywords2 \ 77 co-parse-truncated \ 78 ci-2files \ 79 80.for t in ${LTESTS} 81REGRESS_TARGETS+=test-${t} 82.endfor 83 84test-ci-initial: clean 85 @echo 'this is a test file' > test 86 @echo "a test file" | ${CI} -q -l test 87 @grep -q 'this is a test file' test,v 88 89# Testing 'ci test' with non-interactive log message 90test-ci-mflag: 91 @echo 'another revision' >> test 92 @${CI} -q -m'a second revision' test 93 @test ! -e test 94 @grep -q 'another revision' test,v 95 96# Testing 'co -l test' 97test-ci-lflag: 98 @${CO} -q -l test 99 @test -e test 100 101# Testing 'ci -r1.30 test' with non-interactive log message 102test-ci-rflag: 103 @echo "new stuff" >> test 104 @${CI} -q -r1.30 -m'bumped rev' test 105 @test ! -e test 106 107# Testing 'co -l test' 108test-co-lflag: 109 @${CO} -q -l test 110 @test -e test 111 112# Testing 'ci test' (should be rev 1.31) with non-interactive log message 113test-ci-rev: 114 @echo "a third revision" >> test 115 @${CI} -q -m'this should be rev 1.31' test 116 @grep -q '1.31' test,v 117 118# Testing 'co -u test' - ensuring permissions are 0444 119test-co-perm: 120 @${CO} -q -u test 121 @eval 'test `stat -f%p test` = 100444' 122 123# Testing 'co -l test' - ensuring permissions are 0644 124test-co-perm2: 125 @rm -rf test 126 @${CO} -q -l test 127 @eval 'test `stat -f%p test` = 100644' 128 129# Testing 'ci -u' - ensuring permissions are 0444 130test-ci-perm: 131 @echo "a line for ci -u" >> test 132 @${CI} -q -m'message for ci -u' -u test 133 @eval 'test `stat -f%p test` = 100444' 134 135# Testing 'ci -l' - ensuring permissions are 0644 136test-ci-perm2: 137 @rm -rf test 138 @${CO} -q -l test 139 @echo "a line for ci -l" >> test 140 @${CI} -q -m'message for ci -l' -l test 141 @eval 'test `stat -f%p test` = 100644' 142 143# Testing ci with an invalid date 144test-ci-dinvalid: 145 @echo 'some text for invalid date text' >> test 146 @if @${CI} -q -d'an invalid date' -m'invalid date' -l test 2>/dev/null; then false; fi 147 @if grep 'some text for invalid date text' test,v; then false; fi 148 149# Testing ci with a date older than previous revision 150test-ci-dold: 151 @echo 'some text for old date test' >> test 152 @if ${CI} -q -d'1990-01-12 04:00:00+00' -m'old dated revision' -l test 2>/dev/null; then false; fi 153 @if grep 'some text for old date test' test,v; then false; fi 154 155# Testing ci -wtestuser 156test-ci-wflag: 157 @rm -rf test 158 @${CO} -q -l test 159 @echo "blah blah" >> test 160 @echo "output for ci -w" >> test 161 @${CI} -q -wtestuser -mcomment -l test 162 @grep -q 'author testuser' test,v 163 164# Testing 'rcsdiff -u test' after adding another line 165test-rcsdiff-uflag: 166 @echo "a line for rcsdiff test" >> test 167 @${RCSDIFF} -q -u test | tail -n 5 | \ 168 ${DIFF} ${.CURDIR}/rcsdiff-uflag.out - 169 170# Testing 'rcsdiff -u -r1.2 test' 171test-rcsdiff-rflag: 172 @${RCSDIFF} -q -u -r1.2 test | tail -n +3 | \ 173 ${DIFF} ${.CURDIR}/rcsdiff-rflag.out - 174 175# Testing 'rcs -m1.2:logmessage' 176test-rcs-mflag: 177 @${RCS} -q -m1.2:logmessage test 178 @grep -q 'logmessage' test,v 179 180# Testing 'rcs -m'1.2:a new log message'' 181test-rcs-mflag2: 182 @${RCS} -q -m1.1:'a new log message, one which is quite long and set by rcsprog' test 183 @grep -q 'a new log message, one which is quite long and set by rcsprog' test,v 184 185# Testing RCSINIT environment variable 186test-co-RCSINIT: 187 @rm -rf test 188 @RCSINIT=-l ${CO} -q test 189 @eval 'test `stat -f%p test` = 100644' 190 191# Testing check-in with symbol 192test-ci-nflag: 193 @echo "something to check in with a symbol" >> test 194 @${CI} -q -n'symbolname' -m'test symbols' -l test 195 @grep -q 'symbolname' test,v 196 197# Testing check-in, forcing symbol 198test-ci-Nflag: 199 @echo "something to check in with a forced symbol" >> test 200 @${CI} -q -N'symbolname' -m'test force symbol' -l test 201 @grep -q 'test force symbol' test,v 202 203# Trying some jiggerypokery with state 204test-ci-sflag: 205 @echo "blahblah" >> test 206 @if ${CI} -q -l -s'SPACE S' -m"state with a space" test; then false; fi 207 @if grep -q 'SPACE S' test,v; then false; fi 208 209# Trying to check it out 210test-co-lflag2: 211 @rm -rf test 212 @${CO} -q -l test 213 @test -e test 214 215test-rcsclean: clean 216 @touch file 217 @${RCSCLEAN} -q file 218 @${RCSCLEAN} -q1.1 file 219 @${RCSCLEAN} -qsym file 220 @test -f file 221 222 @echo . | ${CI} -q -nsym file 223 @${CO} -q file 224 @${RCSCLEAN} -q file 225 @test ! -f file 226 @${CO} -q file 227 @${RCSCLEAN} -q1.1 file 228 @test ! -f file 229 @${CO} -q file 230 @${RCSCLEAN} -qsym file 231 @test ! -f file 232 233 @${CO} -q -l file 234 @${RCSCLEAN} -q file 235 @test -f file 236 @${RCSCLEAN} -q -u file 237 @test ! -f file 238 @${CO} -q -l file 239 @echo change >> file 240 @${RCSCLEAN} -q file 241 @${RCSCLEAN} -q -u file 242 @test -f file 243 244test-merge-eflag: clean 245 @echo "line1\nline2\nfile1new" > file1 246 @echo "line1\nline2" > file2 247 @echo "line1\nfile3new\nline2" > file3 248 @${MERGE} -p -q -e file1 file2 file3 | \ 249 ${DIFF} ${.CURDIR}/merge-eflag.out - 250 251test-merge-noeol: clean 252 @echo "<<<<<<< file1\nline1=======\nline3\n>>>>>>> file3" \ 253 > merge-noeol.out 254 @echo -n "line1" > file1 255 @echo "line2" > file2 256 @echo "line3" > file3 257 @${MERGE} -p -q file1 file2 file3 | ${DIFF} merge-noeol.out - 258 @echo "<<<<<<< file1\nline1\n=======\nline3\n>>>>>>> file3" \ 259 > merge-noeol.out 260 @echo "line1" > file1 261 @echo -n "line2" > file2 262 @echo "line3" > file3 263 @${MERGE} -p -q file1 file2 file3 | ${DIFF} merge-noeol.out - 264 @echo "<<<<<<< file1\nline1\n=======\nline3>>>>>>> file3" \ 265 > merge-noeol.out 266 @echo "line1" > file1 267 @echo "line2" > file2 268 @echo -n "line3" > file3 269 @${MERGE} -p -q file1 file2 file3 | ${DIFF} merge-noeol.out - 270 @echo "<<<<<<< file1\nline1=======\nline3>>>>>>> file3" \ 271 > merge-noeol.out 272 @echo -n "line1" > file1 273 @echo -n "line2" > file2 274 @echo -n "line3" > file3 275 @${MERGE} -p -q file1 file2 file3 | ${DIFF} merge-noeol.out - 276 277test-rcsmerge: 278 @cp -f ${.CURDIR}/rev1 blah.c 279 @echo "descr" | ${CI} -q -l -m"first rev" blah.c 280 @cp -f ${.CURDIR}/rev2 blah.c 281 @${CI} -q -l -m"second rev" blah.c 282 @cp -f ${.CURDIR}/rev3 blah.c 283 @${CI} -q -l -m"third rev" blah.c 284 285 @${RCSMERGE} -q -r1.1 -r1.3 -p blah.c | \ 286 ${DIFF} ${.CURDIR}/rcsmerge.out - 287 288test-rcsmerge-symbols: clean 289 @mkdir RCS 290 @cp -f ${.CURDIR}/rev1 blah.c 291 @echo "descr" | ${CI} -q -l -nsym1 -m"first rev" blah.c 292 @cp -f ${.CURDIR}/rev2 blah.c 293 @${CI} -q -l -nsym2 -m"second rev" blah.c 294 @cp -f ${.CURDIR}/rev3 blah.c 295 @${CI} -q -l -nsym3 -m"third rev" blah.c 296 297 @${RCSMERGE} -q -rsym1 -rsym3 -p blah.c | \ 298 ${DIFF} ${.CURDIR}/rcsmerge.out - 299 300test-rcsdiff: 301 @rm -rf blah.c,v 302 303 @cp -f ${.CURDIR}/rev1 blah.c 304 @echo "descr" | ${CI} -q -l -m"first rev" blah.c 305 @cp -f ${.CURDIR}/rev2 blah.c 306 @${CI} -q -l -m"second rev" blah.c 307 @cp -f ${.CURDIR}/rev3 blah.c 308 @${CI} -q -l -m"third rev" blah.c 309 310 @${RCSDIFF} -q -r1.1 -r1.3 -u blah.c | tail -n +3 | \ 311 ${DIFF} ${.CURDIR}/rcsdiff.out - 312 313test-rcsdiff-symbols: clean 314 @mkdir RCS 315 @cp -f ${.CURDIR}/rev1 blah.c 316 @echo "descr" | ${CI} -q -l -nsym1 -m"first rev" blah.c 317 @cp -f ${.CURDIR}/rev2 blah.c 318 @${CI} -q -l -nsym2 -m"second rev" blah.c 319 @cp -f ${.CURDIR}/rev3 blah.c 320 @${CI} -q -l -nsym3 -m"third rev" blah.c 321 322 @${RCSDIFF} -q -rsym1 -rsym3 -u blah.c | tail -n +3 | \ 323 ${DIFF} ${.CURDIR}/rcsdiff.out - 324 325# Testing 'ci -d'2037-01-12 04:00:00+00' -l test 326test-ci-dflag: clean 327 @echo "some text for date test" >> test 328 @echo . | ${CI} -q -d'2037-01-12 04:00:00+00' -m'dated revision' -l test 329 @grep -q 'dated revision' test,v 330 331test-ci-xflag: 332 @mkdir -p RCS 333 @rm -rf RCS/file* 334 @touch file 335 @echo . | ${CI} -q -x,abcd/,v file 336 @test -e RCS/file,abcd 337 @test ! -e RCS/file,v 338 339 @mv -f RCS/file,abcd RCS/file,v 340 @${CO} -q -l file 341 @echo revision >> file 342 @echo . | ${CI} -q -x,abcd/,v/xyz file 343 @test ! -e RCS/file,abcd 344 @fgrep -q revision RCS/file,v 345 @test ! -e RCS/filexyz 346 347 @touch file 348 @echo more >> file 349 @echo . | ${CI} -q -x file 350 @fgrep -q more RCS/file 351 352test-comma: 353 @rm -rf RCS 354 @mkdir -p RCS 355 @touch file,notext 356 @echo . | ${CI} -q file,notext 357 @test -e RCS/file,notext,v 358 @test ! -e RCS/file,v 359 360# Testing 'rcs -afoo,bar,baz' 361test-rcs-aflag: clean 362 @echo "." | ${RCS} -q -i test 363 @${RCS} -q -afoo,bar,baz test 364 @${RLOG} test | ${DIFF} ${.CURDIR}/rcs-aflag.out - 365 366# Testing 'rcs -efoo,bar,baz' 367test-rcs-eflag: test-rcs-aflag 368 @${RCS} -q -efoo,bar,baz test 369 @${RLOG} test | ${DIFF} ${.CURDIR}/rcs-eflag.out - 370 371# Testing 'rcs -Atest newfile' 372test-rcs-Aflag: test-rcs-aflag 373 @echo "." | ${RCS} -q -i newfile 374 @${RCS} -q -Atest newfile 375 @${RLOG} newfile | ${DIFF} ${.CURDIR}/rcs-Aflag.out - 376 377test-rcs-tflag-stdin: clean 378 @echo 'This is a description.' | ${RCS} -q -i -t file 379 @fgrep -q 'This is a description.' file,v 380 381test-rcs-tflag-stdin2: clean 382 @echo '.This is not the description end.' | ${RCS} -q -i -t file 383 @fgrep -q '.This is not the description end.' file,v 384 385test-rcs-tflag-stdin3: clean 386 @echo "This is the description end.\n.\nThis should not be here." | \ 387 ${RCS} -q -i -t file 388 @fgrep -q 'This should not be here.' file,v || \ 389 case "$$?" in 1) exit 0;; esac && exit 1 390 391test-rcs-tflag-inline: clean 392 @${RCS} -q -i '-t-This is a description.' file 393 @fgrep -q 'This is a description.' file,v 394 395test-rcs-tflag-file: clean 396 @echo 'This is a description.' > description 397 @${RCS} -q -i -tdescription file 398 @fgrep -q 'This is a description.' file,v 399 400# Testing deletion of ranges 401test-rcs-oflag: clean 402 @cp ${.CURDIR}/rev3 blah.c 403 @echo "blah" | ${CI} -q blah.c 404 @${CO} -q -l blah.c 405 @echo "blah2" >> blah.c 406 @echo "blah2" | ${CI} -q blah.c 407 @${CO} -q -l blah.c 408 @echo "blah3" >> blah.c 409 @echo "blah3" | ${CI} -q blah.c 410 @${CO} -q -l blah.c 411 @echo "blah4" >> blah.c 412 @echo "blah4" | ${CI} -q blah.c 413 @${CO} -q -l blah.c 414 @echo "blah5" >> blah.c 415 @echo "blah5" | ${CI} -q blah.c 416 @${CO} -q -l blah.c 417 @echo "blah6" >> blah.c 418 @echo "blah6" | ${CI} -q blah.c 419 @${CO} -q -l blah.c 420 @${RCS} -q -o1.3:1.5 blah.c 421 @tr '\n' ' ' < blah.c,v | grep -q '[[:space:]]1.3[[:space:]]' || \ 422 case "$$?" in 1) exit 0;; esac && exit 1 423 @tr '\n' ' ' < blah.c,v | grep -q '[[:space:]]1.4[[:space:]]' || \ 424 case "$$?" in 1) exit 0;; esac && exit 1 425 @tr '\n' ' ' < blah.c,v | grep -q '[[:space:]]1.5[[:space:]]' || \ 426 case "$$?" in 1) exit 0;; esac && exit 1 427 428test-rcs-lock-unlock: clean 429 @touch file 430 @mkdir -p RCS 431 @echo . | ${CI} -q -l file 432 @echo sometext > file 433 @echo . | ${CI} -q file 434 435 @${RCS} -q -l file 436 @${RLOG} file | fgrep -x -A 1 'locks: strict' | head -n 2 | fgrep -q 1.2 437 @${RCS} -q -u file 438 @${RLOG} file | fgrep -x -A 1 'locks: strict' | head -n 2 | fgrep -q 1.2 || \ 439 case "$$?" in 1) exit 0;; esac && exit 1 440 441 @${RCS} -q -l1.1 file 442 @${RLOG} file | fgrep -x -A 1 'locks: strict' | head -n 2 | fgrep -q 1.1 443 @${RCS} -q -u1.1 file 444 @${RLOG} file | fgrep -x -A 1 'locks: strict' | head -n 2 | fgrep -q 1.1 || \ 445 case "$$?" in 1) exit 0;; esac && exit 1 446 447 @${RCS} -q -l1.2 file 448 @${RLOG} file | fgrep -x -A 1 'locks: strict' | head -n 2 | fgrep -q 1.2 449 @${RCS} -q -u1.2 file 450 @${RLOG} file | fgrep -x -A 1 'locks: strict' | head -n 2 | fgrep -q 1.2 || \ 451 case "$$?" in 1) exit 0;; esac && exit 1 452 453 @${RCS} -q -u file 454 @${RCS} -q -l file 455 @${RCS} -q -l file 456 @${RCS} -q -l1.3 file || case "$$?" in 1) exit 0;; esac && exit 1 457 @${RCS} -q -u1.3 file || case "$$?" in 1) exit 0;; esac && exit 1 458 459# Testing 'co -l blah.c' for permissions inheritance 460test-co-lock-filemodes: 461 @rm -rf RCS/blah.c,v blah.c 462 @mkdir -p RCS 463 @cp ${.CURDIR}/rev3 blah.c 464 @chmod 444 blah.c 465 @echo "blah" | ${CI} -q blah.c 466 @chmod 755 RCS/blah.c,v 467 @${CO} -q -l blah.c 468 @eval 'test `stat -f%p blah.c` = 100755' 469 @rm -rf blah.c 470 @chmod 666 RCS/blah.c,v 471 @${CO} -q -l blah.c 472 @eval 'test `stat -f%p blah.c` = 100644' 473 @rm -rf blah.c 474 @chmod 600 RCS/blah.c,v 475 @${CO} -q -l blah.c 476 @eval 'test `stat -f%p blah.c` = 100600' 477 @rm -rf blah.c 478 @chmod 604 RCS/blah.c,v 479 @${CO} -q -l blah.c 480 @eval 'test `stat -f%p blah.c` = 100604' 481 @rm -rf blah.c 482 @chmod 754 RCS/blah.c,v 483 @${CO} -q -l blah.c 484 @eval 'test `stat -f%p blah.c` = 100754' 485 486 487# Testing 'co -u blah.c' for permissions inheritance 488test-co-unlock-filemodes: test-co-lock-filemodes 489 @rm -rf RCS/blah.c,v blah.c 490 @mkdir -p RCS 491 @cp ${.CURDIR}/rev3 blah.c 492 @echo "blah" | ${CI} -q blah.c 493 @chmod 755 RCS/blah.c,v 494 @${CO} -q -u blah.c 495 @eval 'test `stat -f%p blah.c` = 100555' 496 @rm -rf blah.c 497 @chmod 666 RCS/blah.c,v 498 @${CO} -q -u blah.c 499 @eval 'test `stat -f%p blah.c` = 100444' 500 @rm -rf blah.c 501 @chmod 600 RCS/blah.c,v 502 @${CO} -q -u blah.c 503 @eval 'test `stat -f%p blah.c` = 100400' 504 @rm -rf blah.c 505 @chmod 604 RCS/blah.c,v 506 @${CO} -q -u blah.c 507 @eval 'test `stat -f%p blah.c` = 100404' 508 @rm -rf blah.c 509 @chmod 754 RCS/blah.c,v 510 @${CO} -q -u blah.c 511 @eval 'test `stat -f%p blah.c` = 100554' 512 513# Testing 'ci blah.c' for permissions inheritance 514test-ci-filemodes: test-co-unlock-filemodes 515 @rm -rf RCS/blah.c,v blah.c 516 @mkdir -p RCS 517 @cp ${.CURDIR}/rev3 blah.c 518 @chmod 755 blah.c 519 @echo "blah" | ${CI} -q blah.c 520 @eval 'test `stat -f%p RCS/blah.c,v` = 100555' 521 @rm -rf RCS/blah.c,v blah.c 522 @cp ${.CURDIR}/rev3 blah.c 523 @chmod 666 blah.c 524 @echo "blah" | ${CI} -q blah.c 525 @eval 'test `stat -f%p RCS/blah.c,v` = 100444' 526 @rm -rf RCS/blah.c,v blah.c 527 @cp ${.CURDIR}/rev3 blah.c 528 @chmod 700 blah.c 529 @echo "blah" | ${CI} -q blah.c 530 @eval 'test `stat -f%p RCS/blah.c,v` = 100500' 531 @rm -rf RCS/blah.c,v blah.c 532 @cp ${.CURDIR}/rev3 blah.c 533 @chmod 606 blah.c 534 @echo "blah" | ${CI} -q blah.c 535 @eval 'test `stat -f%p RCS/blah.c,v` = 100404' 536 537# Test various operations on a file with no revisions. 538test-rcs-iflag: clean 539 @mkdir -p RCS 540 @echo . | ${RCS} -i -q file 541 @test -f RCS/file,v 542 @${CO} -q file 543 @test -f file 544 @test ! -s file 545 @rm -f file 546 @${CO} -q -l file 547 @echo text >> file 548 @${CI} -q file 549 @fgrep -q 1.1 RCS/file,v 550 551test-rlog-lflag: clean 552 @mkdir RCS 553 @touch file 554 @echo rev1 | ${CI} -q -l file 555 @${RLOG} -l file | fgrep -q 'revision 1.1' 556 @echo line >> file 557 @echo rev2 | ${CI} -q file 558 @${RLOG} -l file | fgrep -q 'revision 1.2' || \ 559 case "$$?" in 1) exit 0;; esac && exit 1 560 561# Test various cases for the -r flag 562test-rlog-rflag: clean 563 @touch file 564 @echo "foo" > file 565 @echo "descr" | ${CI} -q -m"first rev" -d'2006-01-01 00:00:00+00' \ 566 -wfoo file 567 @${CO} -q -l file 568 @echo "foo" >> file 569 @${CI} -q -m"second rev" -d'2006-01-01 00:00:00+00' -wfoo file 570 @${CO} -q -l file 571 @echo "foo" >> file 572 @${CI} -q -m"third rev" -d'2006-01-01 00:00:00+00' -wfoo file 573 574 @${RLOG} -r1.1 file | ${DIFF} ${.CURDIR}/rlog-rflag1.out - 575 @${RLOG} -r1.1:1.3 file | ${DIFF} ${.CURDIR}/rlog-rflag2.out - 576 @${RLOG} -r1.2: file | ${DIFF} ${.CURDIR}/rlog-rflag3.out - 577 @${RLOG} -r:1.1 file | ${DIFF} ${.CURDIR}/rlog-rflag4.out - 578 579test-rlog-zflag: clean 580 @touch file 581 @echo "descr" | ${CI} -q -m"first rev" -d'2006-01-01 00:00:00+00' \ 582 -wfoo file 583 @${RLOG} -zLT file | ${DIFF} ${.CURDIR}/rlog-zflag1.out - 584 @${RLOG} -z+03:14:23 file | ${DIFF} ${.CURDIR}/rlog-zflag2.out - 585 @${RLOG} -z+03:14 file | ${DIFF} ${.CURDIR}/rlog-zflag3.out - 586 @${RLOG} -z+0314 file | ${DIFF} ${.CURDIR}/rlog-zflag4.out - 587 @${RLOG} -z-03:14:23 file | ${DIFF} ${.CURDIR}/rlog-zflag5.out - 588 589test-ci-nofile: 590 @${CI} -q nonexistent || case "$$?" in 1) exit 0;; esac && exit 1 591 592test-ci-revert: clean 593 @mkdir RCS 594 @touch file 595 @echo . | ${CI} -q -l file 596 @${CI} -q -mm -l file 597 @# Make sure reverting doesn't unlock file. 598 @${CI} -q -mm -l file 599 600test-ci-keywords: clean 601 @mkdir RCS 602 @sed 's/.*/$$&$$/' ${.CURDIR}/keywords.in > file 603 @sed 's/^[A-Z][A-Z]*[a-z][a-z]*: .*/$$&$$/' ${.CURDIR}/keywords.out > newfile 604 @echo . | ${CI} -q -u file 605 @sed -e "s,$$(logname),USER," \ 606 -e "s/\($$[A-Z][a-z]*: \).*file,v/\1file,v/" \ 607 -e 's,[0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9],YYYY/MM/DD HH:MI:SS,' \ 608 file | ${DIFF} newfile - 609 610# Lots of expansion. 611test-ci-keywords2: clean 612 @perl -e 'print "\$$Id\$$\n" x 10000;' > file 613 @echo . | ${CI} -l -q file 614 615test-ci-parse-keywords: clean 616 @echo '$Id' > test 617 @echo . | ${CI} -q -k test 618 619test-ci-parse-keywords2: clean 620 @echo '$Id: blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah' > test 621 @echo . | ${CI} -q -k test 622 623# Check for correct EOF handling in rcs parser 624test-co-parse-truncated: clean 625 @sh -c 'ulimit -d 5000 && ${CO} -q ${.CURDIR}/test-truncated > truncated.out 2>&1' || \ 626 case "$$?" in 1) exit 0;; esac && exit 1 627 @grep -q 'co: could not parse admin data' truncated.out 628 629test-ci-2files: clean 630 @touch foo bar 631 @${CI} -q -t-first -l foo 632 @test -f foo,v -a ! -f bar,v 633 @${CI} -q -t-second -l foo bar 634 @test -f foo,v -a -f bar,v 635 636clean: 637 @rm -rf ${CLEANFILES} 638 639.include <bsd.regress.mk> 640