From 68d8d83e67ce555f20d953cd27239681ad0f7bd9 Mon Sep 17 00:00:00 2001 From: tg Date: Mon, 12 Nov 2012 19:13:46 +0000 Subject: [PATCH] =?UTF-8?q?add=20checks=20for=20~+=20and=20~-=20(inspired?= =?UTF-8?q?=20by=20posh=20change)=20and=20bump=20date,=20as=20I=E2=80=99m?= =?UTF-8?q?=20not=20likely=20to=20continue=20hacking=20tonight?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- check.t | 24 +++++++++++++++++++++--- sh.h | 4 ++-- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/check.t b/check.t index bfeb6fb..5666107 100644 --- a/check.t +++ b/check.t @@ -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 diff --git a/sh.h b/sh.h index fc52461..ec504d0 100644 --- a/sh.h +++ b/sh.h @@ -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