add checks for ~+ and ~- (inspired by posh change) and bump date,

as I’m not likely to continue hacking tonight
This commit is contained in:
tg 2012-11-12 19:13:46 +00:00
parent b7659199ca
commit 68d8d83e67
2 changed files with 23 additions and 5 deletions

24
check.t
View File

@ -1,4 +1,4 @@
# $MirOS: src/bin/mksh/check.t,v 1.564 2012/11/12 18:48:29 tg Exp $
# $MirOS: src/bin/mksh/check.t,v 1.565 2012/11/12 19:13:44 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 $
@ -29,7 +29,7 @@
# http://www.freebsd.org/cgi/cvsweb.cgi/src/tools/regression/bin/test/regress.sh?rev=HEAD
expected-stdout:
@(#)MIRBSD KSH R40 2012/10/30
@(#)MIRBSD KSH R40 2012/11/12
description:
Check version of shell.
stdin:
@ -38,7 +38,7 @@ name: KSH_VERSION
category: shell:legacy-no
---
expected-stdout:
@(#)LEGACY KSH R40 2012/10/30
@(#)LEGACY KSH R40 2012/11/12
description:
Check version of legacy shell.
stdin:
@ -5613,6 +5613,24 @@ expected-stdout:
a=/sweet b=/sweet c=d~ /sweet
a=~ b=~ c=d~ /sweet
---
name: tilde-expand-2
description:
Check tilde expansion works
env-setup: !HOME=/sweet!
stdin:
wd=$PWD
cd /
plus=$(print -r -- ~+)
minus=$(print -r -- ~-)
nix=$(print -r -- ~)
[[ $plus = / ]]; echo one $? .
[[ $minus = "$wd" ]]; echo two $? .
[[ $nix = /sweet ]]; echo nix $? .
expected-stdout:
one 0 .
two 0 .
nix 0 .
---
name: exit-err-1
description:
Check some "exit on error" conditions

4
sh.h
View File

@ -157,9 +157,9 @@
#endif
#ifdef EXTERN
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.601 2012/11/12 18:28:40 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.602 2012/11/12 19:13:46 tg Exp $");
#endif
#define MKSH_VERSION "R40 2012/10/30"
#define MKSH_VERSION "R40 2012/11/12"
/* arithmetic types: C implementation */
#if !HAVE_CAN_INTTYPES