OSDN Git Service

release-request-fad05353-cc19-4c26-af2f-d5c8a574970e-for-git_oc-mr1-release-4057695...
[android-x86/external-toybox.git] / tests / sed.test
index d25148e..75d6ec5 100755 (executable)
@@ -57,6 +57,11 @@ 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 "
+testing '[ in [[]' "sed 's@[[]@X@g'" "X" "" "["
+testing '[[] with ] as delimiter' "sed 's][[]]X]g'" "X" "" "["
+testing '[[] with [ as delimiter' "sed 's[\[\[][X['" "X" "" "["
 
 # gGhHlnNpPqrstwxy:=
 # s///#comment