aboutsummaryrefslogtreecommitdiffstats
path: root/test/ignrcas3.awk
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2016-08-01 22:54:59 +0300
committerArnold D. Robbins <arnold@skeeve.com>2016-08-01 22:54:59 +0300
commitb647466e12da8797dae420889b077f7d60531c58 (patch)
treea6f85621c1f597dc4b9361705a88990dc40e2093 /test/ignrcas3.awk
parentadb5491f2c9f49bf3d0e57f52c55bcaa4221e36e (diff)
parent9698fd1ebff2bc3f76efbf498c28ce21aa515b7e (diff)
downloadegawk-b647466e12da8797dae420889b077f7d60531c58.tar.gz
egawk-b647466e12da8797dae420889b077f7d60531c58.tar.bz2
egawk-b647466e12da8797dae420889b077f7d60531c58.zip
Merge branch 'master' into feature/nocopy
Diffstat (limited to 'test/ignrcas3.awk')
-rw-r--r--test/ignrcas3.awk23
1 files changed, 18 insertions, 5 deletions
diff --git a/test/ignrcas3.awk b/test/ignrcas3.awk
index e74eea64..fd88744d 100644
--- a/test/ignrcas3.awk
+++ b/test/ignrcas3.awk
@@ -1,7 +1,20 @@
BEGIN {
- x = "0"
- print x+0 # trigger NUMCUR
- IGNORECASE = x # should enable ignorecase, since x is a non-null string
- y = "aBc"
- print (y ~ /abc/)
+ dfapat[1] = data[1] = "b\323"
+ dfapat[2] = data[2] = "b\362"
+ dfapat[3] = data[3] = "b\363"
+
+ regexpat[1] = "[a-c]\323"
+ regexpat[2] = "[a-c]\362"
+ regexpat[3] = "[a-c]\363"
+
+ IGNORECASE = 1
+
+ for (i = 1; i <= 3; i++) {
+ for (j = 1; j <= 3; j++) {
+ printf("data[%d] ~ dfa[%d] = %s\n", i, j,
+ data[i] ~ dfapat[j] ? "ok" : "bad")
+ printf("data[%d] ~ regex[%d] = %s\n", i, j,
+ data[i] ~ regexpat[j] ? "ok" : "bad")
+ }
+ }
}