summaryrefslogtreecommitdiffstats
path: root/contrib/awk/test/gsubtest.awk
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/awk/test/gsubtest.awk')
-rwxr-xr-xcontrib/awk/test/gsubtest.awk8
1 files changed, 8 insertions, 0 deletions
diff --git a/contrib/awk/test/gsubtest.awk b/contrib/awk/test/gsubtest.awk
new file mode 100755
index 0000000..3137479
--- /dev/null
+++ b/contrib/awk/test/gsubtest.awk
@@ -0,0 +1,8 @@
+BEGIN {
+ str = "abc"; gsub("b+", "FOO", str); print str
+ str = "abc"; gsub("x*", "X", str); print str
+ str = "abc"; gsub("b*", "X", str); print str
+ str = "abc"; gsub("c", "X", str); print str
+ str = "abc"; gsub("c+", "X", str); print str
+ str = "abc"; gsub("x*$", "X", str); print str
+}
OpenPOWER on IntegriCloud