the QNX /bin/ed problem is worse than thought; use a new mechanism,

because categories in check.t are OR’d:
• no-stderr-ed disables the newish-ed tests (tried using testcase)
• stdout-ed enables the oldish-ed tests (variable, if the above
  testcase succeeds, it’s added, but QNX overrides the variable)
This commit is contained in:
tg 2008-11-08 17:36:35 +00:00
parent 5206ddcc65
commit 446e019c07
2 changed files with 11 additions and 9 deletions

View File

@ -1,5 +1,5 @@
#!/bin/sh
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.367 2008/11/02 23:06:36 tg Exp $'
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.368 2008/11/08 17:36:35 tg Exp $'
#-
# Environment used: CC CFLAGS CPPFLAGS LDFLAGS LIBS NOWARN NROFF TARGET_OS
# CPPFLAGS recognised: MKSH_SMALL MKSH_ASSUME_UTF8 MKSH_NOPWNAM MKSH_NOVI
@ -49,6 +49,7 @@ fx=
me=`basename "$0"`
orig_CFLAGS=$CFLAGS
phase=x
oldish_ed=stdout-ed,no-stderr-ed
if test -t 1; then
bi=''
@ -342,6 +343,7 @@ PW32*)
: ${HAVE_SETLOCALE_CTYPE=0}
;;
QNX)
oldish_ed=no-stderr-ed # oldish /bin/ed is broken
: ${HAVE_SETLOCALE_CTYPE=0}
;;
SunOS)
@ -1201,7 +1203,7 @@ $e ... done.
# the character count to standard output; cope for that
echo wq >x
ed x <x 2>/dev/null | grep 3 >/dev/null 2>&1 && \
check_categories=$check_categories,oldish-ed
check_categories=$check_categories,$oldish_ed
rm -f x
if test 0 = $HAVE_SYS_SIGNAME; then

14
check.t
View File

@ -1,4 +1,4 @@
# $MirOS: src/bin/mksh/check.t,v 1.239 2008/11/02 23:03:45 tg Exp $
# $MirOS: src/bin/mksh/check.t,v 1.240 2008/11/08 17:36:35 tg Exp $
# $OpenBSD: bksl-nl.t,v 1.2 2001/01/28 23:04:56 niklas Exp $
# $OpenBSD: history.t,v 1.5 2001/01/28 23:04:56 niklas Exp $
# $OpenBSD: read.t,v 1.3 2003/03/10 03:48:16 david Exp $
@ -2205,7 +2205,7 @@ description:
Basic (ed) editing works (assumes you have generic ed editor
that prints no prompts). This is for oldish ed(1) which write
the character count to stdout.
category: oldish-ed,!os:nto
category: stdout-ed
arguments: !-i!
env-setup: !ENV=./Env!HISTFILE=hist.file!
file-setup: file 644 "Env"
@ -2227,7 +2227,7 @@ expected-stderr-pattern:
name: history-ed-2-old
description:
Correct command is edited when number given
category: oldish-ed,!os:nto
category: stdout-ed
arguments: !-i!
env-setup: !ENV=./Env!HISTFILE=hist.file!
file-setup: file 644 "Env"
@ -2258,7 +2258,7 @@ description:
in history.
(NOTE: adjusted for COMPLEX HISTORY compile time option)
(ksh88 fails 'cause it lists the fc command)
category: oldish-ed,!os:nto
category: stdout-ed
arguments: !-i!
env-setup: !ENV=./Env!HISTFILE=hist.file!
file-setup: file 644 "Env"
@ -2289,7 +2289,7 @@ name: history-ed-1
description:
Basic (ed) editing works (assumes you have generic ed editor
that prints no prompts). This is for newish ed(1) and stderr.
category: !oldish-ed
category: !no-stderr-ed
arguments: !-i!
env-setup: !ENV=./Env!HISTFILE=hist.file!
file-setup: file 644 "Env"
@ -2309,7 +2309,7 @@ expected-stderr-pattern:
name: history-ed-2
description:
Correct command is edited when number given
category: !oldish-ed
category: !no-stderr-ed
arguments: !-i!
env-setup: !ENV=./Env!HISTFILE=hist.file!
file-setup: file 644 "Env"
@ -2336,7 +2336,7 @@ name: history-ed-3
description:
Newly created multi line commands show up as single command
in history.
category: !oldish-ed
category: !no-stderr-ed
arguments: !-i!
env-setup: !ENV=./Env!HISTFILE=hist.file!
file-setup: file 644 "Env"