last tweak, to demonstrate brokenness of the old code

This commit is contained in:
tg
2017-04-06 02:15:22 +00:00
parent 3909a42540
commit 6f991beb90

View File

@@ -1,4 +1,4 @@
# $MirOS: src/bin/mksh/check.t,v 1.771 2017/04/06 01:59:51 tg Exp $
# $MirOS: src/bin/mksh/check.t,v 1.772 2017/04/06 02:15:22 tg Exp $
# -*- mode: sh -*-
#-
# Copyright © 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
@@ -10941,6 +10941,7 @@ stdin:
---
name: comsub-5
description:
Check COMSUB works with aliases (does not expand them twice)
and reentrancy safety
stdin:
print '#!'"$__progname"'\nfor x in "$@"; do print -r -- "$x"; done' >pfn
@@ -10953,12 +10954,16 @@ stdin:
./pfn "$(echo b)"
typeset -f foo >x
cat x
foo
. ./x
typeset -f foo
foo
expected-stdout:
a b
foo() {
\echo a moo
./pfn "$(\echo a foo )"
}
a moo
a foo
foo() {