-# $OpenBSD: Makefile,v 1.4 2017/08/22 20:14:57 anton Exp $
-
-REGRESS_TARGETS= emacs vi
+# $OpenBSD: Makefile,v 1.5 2021/07/10 07:10:31 anton Exp $
KSH= /bin/ksh
CFLAGS+= -Wall
LDADD+= -lutil
-emacs: edit
+REGRESS_SETUP_ONCE= ${PROG}
+
+REGRESS_TARGETS+= emacs
+REGRESS_TARGETS+= vi
+
+emacs:
sh ${.CURDIR}/emacs.sh ${.CURDIR} ${KSH}
-vi: edit
+vi:
sh ${.CURDIR}/vi.sh ${.CURDIR} ${KSH}
.include <bsd.regress.mk>
-/* $OpenBSD: edit.c,v 1.7 2017/11/21 19:22:45 anton Exp $ */
+/* $OpenBSD: edit.c,v 1.8 2021/07/10 07:10:31 anton Exp $ */
/*
* Copyright (c) 2017 Anton Lindqvist <anton@openbsd.org>
*
err(1, "signal: SIGINT");
memset(&ws, 0, sizeof(ws));
- ws.ws_col = 80,
+ ws.ws_col = 80;
ws.ws_row = 24;
pid = forkpty(&ptyfd, NULL, NULL, &ws);
err(1, "poll");
}
if (nready == 0) {
- if (timeout == PRTIM)
+ if (timeout == PRTIM) {
+ warnx("timeout waiting from prompt");
ret = 1;
+ }
break;
}
if (pfd.revents & (POLLERR | POLLNVAL))
-# $OpenBSD: subr.sh,v 1.8 2017/11/21 19:25:46 anton Exp $
+# $OpenBSD: subr.sh,v 1.9 2021/07/10 07:10:31 anton Exp $
#
# Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
# Copyright (c) 2017 Anton Lindqvist <anton@openbsd.org>
testseq() {
stdin=$1
exp=$(echo "$2")
- act=$(echo -n "$stdin" | ./edit -p "$PS1" ${KSH:-/bin/ksh} -r 2>&1)
+ act=$(echo -n "$stdin" | ./edit -p "$PS1" -- ${KSH:-/bin/ksh} -r 2>&1)
[ $? = 0 ] && [ "$exp" = "$act" ] && return 0
dump input "$stdin"