From c9ccf0bab728d649d2ec8d369194a7843dde2027 Mon Sep 17 00:00:00 2001 From: tg Date: Sun, 19 Apr 2015 19:18:07 +0000 Subject: [PATCH] MFC remaining fixes; tested locally a lot, plus remotely with GNU C11 (Debian 20150413-1) version 5.0.1 20150413 (prerelease) [gcc-5-branch revision 222050] (x86_64-linux-gnu) including ASan (testsuite) and Valgrind (short) --- check.t | 50 +++++++++++++++++++++++++++++++++++++++++++++++--- mksh.1 | 6 +++--- sh.h | 4 ++-- 3 files changed, 52 insertions(+), 8 deletions(-) diff --git a/check.t b/check.t index fc9a2e3..77d68a4 100644 --- a/check.t +++ b/check.t @@ -1,4 +1,4 @@ -# $MirOS: src/bin/mksh/check.t,v 1.689 2015/04/11 23:28:17 tg Exp $ +# $MirOS: src/bin/mksh/check.t,v 1.690 2015/04/19 19:18:03 tg Exp $ # -*- mode: sh -*- #- # Copyright © 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, @@ -30,7 +30,7 @@ # (2013/12/02 20:39:44) http://openbsd.cs.toronto.edu/cgi-bin/cvsweb/src/regress/bin/ksh/?sortby=date expected-stdout: - @(#)MIRBSD KSH R51 2015/04/11 + @(#)MIRBSD KSH R51 2015/04/19 description: Check version of shell. stdin: @@ -39,7 +39,7 @@ name: KSH_VERSION category: shell:legacy-no --- expected-stdout: - @(#)LEGACY KSH R51 2015/04/11 + @(#)LEGACY KSH R51 2015/04/19 description: Check version of legacy shell. stdin: @@ -8591,6 +8591,50 @@ expected-stdout: {220->> Bitte keine Werbung einwerfen! << } {220 Who do you wanna pretend to be today? } --- +name: print-crlf +description: + Check that CR+LF is shown and read as-is +stdin: + cat >foo <<-'EOF' + x='bar + ' # + if test x"$KSH_VERSION" = x""; then # + printf '<%s>' "$x" # + else # + print -nr -- "<$x>" # + fi # + EOF + echo "[$("$__progname" foo)]" + "$__progname" foo | while IFS= read -r line; do + print -r -- "{$line}" + done +expected-stdout: + [] + {foo <<-'EOF' + x='bar + ' # + if test x"$KSH_VERSION" = x""; then # + printf '<%s>' "$x" # + else # + print -nr -- "<$x>" # + fi # + EOF + echo "[$("$__progname" foo)]" + "$__progname" foo | while IFS= read -r line; do + print -r -- "{$line}" + done +expected-stdout: + [] + {