[Toybox] [PATCH] sed: add test for AOSP build breakage.

Rob Landley rob at landley.net
Fri Jan 11 20:04:40 PST 2019


On 1/11/19 6:22 PM, enh via Toybox wrote:
> Bug: http://b/122744241
> ---
>  tests/sed.test | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/tests/sed.test b/tests/sed.test
> index 75d6ec5d..154b36a0 100755
> --- a/tests/sed.test
> +++ b/tests/sed.test
> @@ -2,6 +2,9 @@
> 
>  #testing "name" "command" "result" "infile" "stdin"
> 
> +# toybox saying "no }" here broke the AOSP build.
> +testing "Braces" "sed -n '/START/{:a;n;/END/q;p;ba}'" "b\nc\n" ""
> "a\nSTART\nb\nc\nEND\nd"
> +

It's p;ba;} without which it thinks } is part of the label.

But then I'm already violating posix by allowing _that_ much:

  Editing commands other than {...}, a, b, c, i, r, t, w, :, and # can be
  followed by a <semicolon>, optional <blank> characters, and another editing
  command.

Technically, it considers } a command. :P But if that's what debian does... Try
now. (I also moved the test to the end, which is where "bugs we hit in the
field" tend to go when they don't obviously fit among the existing tests.)

Rob



More information about the Toybox mailing list