Module Name:    src
Committed By:   kre
Date:           Sat Jun 24 11:06:17 UTC 2017

Modified Files:
        src/tests/bin/sh: t_fsplit.sh

Log Message:
NFC:   Added some comments (about other comments)

We currently parse var expansions like "${x-"a b c"}" incorrectly
according to POSIX (and ancient tradition) though in a way that is
generally unexpcted (there are 2 quoted strings there, according
to the standard, "${x-" and "}" and 'a b c' is unquoted.)  This has
never been fixed in our sh, as like in many other shells, it is just
a little unbelievable, most people expect that inside the {} is a
whole new ballpark, and everything starts again, and it does in cases
like "${x%"a b c"}" (the newer matching operators.)  There have been
comments in this test explaining how the test is actually testing for
incorrect behaviour for a while now.

But I have since learned of POSIX bug #221 (2010), the resolution of which is
to make the problem case unspecified.  This will not actually become part
of posix until the next major version (POSIX 8) whenever that appears (still
years away I expect) - but at least we now can feel happier about the
way our code works and not worry quite so much about testing that incorrect
code keeps working incorrectly....


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/bin/sh/t_fsplit.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Reply via email to