incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Brown" <mark.g.br...@gmail.com>
Subject Re: svn commit: r628839 - /stdcxx/trunk/tests/self/0.braceexp.cpp
Date Fri, 22 Feb 2008 01:18:11 GMT
On 2/21/08, Travis Vitek <Travis.Vitek@roguewave.com> wrote:
>
>
>  >Mark Brown wrote:
>  >
>  >On 2/19/08, Martin Sebor <sebor@roguewave.com> wrote:
>  >>Travis Vitek wrote:
>  >>> sebor-2 wrote:
>  >>>> +    // weirdly-formed brace expansions -- fixed in post-bash-3.1
>  >>>> +    TEST ("a-{b{d,e}}-c",    "a-{bd}-c a-{be}-c");
>  >>>>
>  >>>
>  >>> I don't understand how this could be interpreted as valid
>  >>> brace expansion at all. The body of the expansion is '{b{d,e}}'.
>  >>> Paragraph 5 [and paragraph 1 for that matter] require a
>  >>> correctly-formed brace expansion have unquoted [unescaped?]
>  >>> opening and closing braces, and at least one unquoted comma or
>  >>> a valid sequence expression. The body does not meet either of
>  >>> these requirements, so it must be invalid.
>  >>>
>  >
>  >The C-Shell that had brace expansion long before Bash did outputs
>  >a-bd-c a-be-c as Martin expects. It doesn't require a comma at all.
>
>
> Yes, but "a-bd-c a-be-c" is very different from "a-{bd}-c a-{be}-c",
>  which the test expects.

Mea culpa! My eyesight must be going. I completely overlooked the braces.

>
>  Many of the shells implement brace expansion in one way or another. One
>  problem that I see with bash is that the documentation appears to be out
>  of date or incomplete. The man pages [and the reference manual]
>  explicitly say...
>
>     A correctly-formed brace expansion must contain unquoted opening
>
>     and closing braces, and at least one unquoted comma or a valid
>
>     sequence expression. Any incorrectly formed brace expansion is
>     left unchanged.

According to the Bash FAQ this is supposed to be the only difference.
http://www.unixguide.net/unix/bash/D2.shtml

-- Mark

Mime
View raw message