* plug a regression introduced as a pasto (think, mira!)

* add selftest-direct-builtin-call regression test, while here
This commit is contained in:
tg 2011-02-13 21:13:08 +00:00
parent a796512040
commit 36d41ed9ee
3 changed files with 27 additions and 6 deletions

25
check.t

@ -1,4 +1,4 @@
# $MirOS: src/bin/mksh/check.t,v 1.407 2011/02/11 01:18:15 tg Exp $ # $MirOS: src/bin/mksh/check.t,v 1.408 2011/02/13 21:13:05 tg Exp $
# $OpenBSD: bksl-nl.t,v 1.2 2001/01/28 23:04:56 niklas 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: 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 $ # $OpenBSD: read.t,v 1.3 2003/03/10 03:48:16 david Exp $
@ -25,7 +25,7 @@
# http://www.research.att.com/~gsf/public/ifs.sh # http://www.research.att.com/~gsf/public/ifs.sh
expected-stdout: expected-stdout:
@(#)MIRBSD KSH R39 2011/02/11 @(#)MIRBSD KSH R39 2011/02/13
description: description:
Check version of shell. Check version of shell.
stdin: stdin:
@ -65,6 +65,15 @@ category: disabled
stdin: stdin:
set set
--- ---
name: selftest-direct-builtin-call
description:
Check that direct builtin calls work
stdin:
ln -s "$__progname" echo
./echo -c 'echo foo'
expected-stdout:
-c echo foo
---
name: alias-1 name: alias-1
description: description:
Check that recursion is detected/avoided in aliases. Check that recursion is detected/avoided in aliases.
@ -4468,6 +4477,18 @@ stdin:
time time
} }
--- ---
name: regression-65
description:
check for a regression with sleep builtin and signal mask
time-limit: 3
stdin:
sleep 1
echo blub |&
while read -p line; do :; done
echo ok
expected-stdout:
ok
---
name: syntax-1 name: syntax-1
description: description:
Check that lone ampersand is a syntax error Check that lone ampersand is a syntax error

@ -38,7 +38,7 @@
#endif #endif
#endif #endif
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.170 2011/02/11 01:18:17 tg Exp $"); __RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.171 2011/02/13 21:13:06 tg Exp $");
#if HAVE_KILLPG #if HAVE_KILLPG
/* /*
@ -3704,7 +3704,7 @@ c_sleep(const char **wp)
else else
bi_errorf("%s: %s", T_select, strerror(errno)); bi_errorf("%s: %s", T_select, strerror(errno));
#ifndef MKSH_NOPROSPECTOFWORK #ifndef MKSH_NOPROSPECTOFWORK
sigprocmask(SIG_BLOCK, &omask, NULL); sigprocmask(SIG_SETMASK, &omask, NULL);
#endif #endif
} }
return (rv); return (rv);

4
sh.h

@ -154,9 +154,9 @@
#endif #endif
#ifdef EXTERN #ifdef EXTERN
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.430 2011/02/11 01:18:22 tg Exp $"); __RCSID("$MirOS: src/bin/mksh/sh.h,v 1.431 2011/02/13 21:13:08 tg Exp $");
#endif #endif
#define MKSH_VERSION "R39 2011/02/11" #define MKSH_VERSION "R39 2011/02/13"
#ifndef MKSH_INCLUDES_ONLY #ifndef MKSH_INCLUDES_ONLY