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"
+
 testing 'as cat' 'sed ""' "one\ntwo\nthree" "" "one\ntwo\nthree"
 # This segfaults ubuntu 12.04's sed. No really.
 SKIP_HOST=1 testing 'sed - - twice' 'sed "" - -' "hello\n" "" "hello\n"
-- 
2.20.1.97.g81188d93c3-goog
From 069877414085b0400eec03c552153ddd276456f5 Mon Sep 17 00:00:00 2001
From: Elliott Hughes <[email protected]>
Date: Fri, 11 Jan 2019 16:22:11 -0800
Subject: [PATCH] sed: add test for AOSP build breakage.

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"
+
 testing 'as cat' 'sed ""' "one\ntwo\nthree" "" "one\ntwo\nthree"
 # This segfaults ubuntu 12.04's sed. No really.
 SKIP_HOST=1 testing 'sed - - twice' 'sed "" - -' "hello\n" "" "hello\n"
-- 
2.20.1.97.g81188d93c3-goog

_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to