aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2016-09-06 00:14:24 -0500
committerRob Landley <rob@landley.net>2016-09-06 00:14:24 -0500
commit337c072ac09a94a4a47d81cb214b3b8e55eee621 (patch)
treec6dc6584a3f12dc81dfbdcacc4d3330b0fa3cfb9 /tests
parenteed9ed41aa73023af8f79cd5353b96b80585490f (diff)
downloadtoybox-337c072ac09a94a4a47d81cb214b3b8e55eee621.tar.gz
Teach sed s/// how to handle [:space:] type sequences.
Or more accurately, s@[[:space:]@]@replace@ which can't treat the @ in [] as a delimiter but has to know about nested [[]] to make that decision.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/sed.test2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/sed.test b/tests/sed.test
index d25148ed..f48b73e6 100755
--- a/tests/sed.test
+++ b/tests/sed.test
@@ -57,6 +57,8 @@ testing 'multiple regex address match' 'sed -n /on/,/off/p' \
'zap\nbone\nturtle\scoff\nfred\ntron\nlurid\noffer\nbecause\n'
testing 'regex address overlap' 'sed -n /on/,/off/p' "on\nzap\noffon\n" "" \
'on\nzap\noffon\nping\noff\n'
+testing 'getdelim with nested [:blah:]' 'sed -n "sa\a[a[:space:]bc]*aXXagp"' \
+ "ABXXCDXXEFXXGHXXIXX" "" "ABaaCDa EFaa aGHa a Ia "
# gGhHlnNpPqrstwxy:=
# s///#comment