aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2021-09-06 10:41:37 +0300
committerArnold D. Robbins <arnold@skeeve.com>2021-09-06 10:41:37 +0300
commit4f7ec39c9d7a02b1ef483a78e7596390c049df53 (patch)
tree29742a4187f9c82896291de3151820b53450a3c3
parentdedc6b3d8512aca225d9b39a13b60dbd5c92d702 (diff)
downloadegawk-4f7ec39c9d7a02b1ef483a78e7596390c049df53.tar.gz
egawk-4f7ec39c9d7a02b1ef483a78e7596390c049df53.tar.bz2
egawk-4f7ec39c9d7a02b1ef483a78e7596390c049df53.zip
Add the actual test files.
-rw-r--r--test/typeof6.awk46
-rw-r--r--test/typeof6.ok1
2 files changed, 47 insertions, 0 deletions
diff --git a/test/typeof6.awk b/test/typeof6.awk
new file mode 100644
index 00000000..a1988c18
--- /dev/null
+++ b/test/typeof6.awk
@@ -0,0 +1,46 @@
+
+BEGIN{
+
+ A[ "any index" ] = 1 # any number
+
+ for ( i in A ) {
+
+ v = A[ i ]
+
+ gensub( /^/, "1", 1, v )
+
+ #gsub( /^dfsdfs/, "1", v )
+
+ #sub( /^/, "1", v )
+
+ if ( typeof( A[ i ] ) == "unknown" )
+
+ print "ERROR: A[ " i " ] == " A[ i ] "'" }
+
+ v = A[ "any index" ]
+
+ print typeof( v )
+
+ }
+
+
+
+# GNU Awk 5.1.0, API: 3.0 (GNU MPFR 3.1.5, GNU MP 6.1.2)
+# Copyright (C) 1989, 1991-2020 Free Software Foundation.
+#
+# Windows 10x64
+#
+# here is the typeof() error reproducing script
+# it is actual for: gensub(), gsub() and sub() built-ins
+#
+# please pay attention that: v = A[ i ] is doesn't matter
+# you may apply built-ins at A[ i ] directly with the same
+# result
+#
+# with Respect
+#
+# Denis Shirokov (2021.9.5)
+
+
+
+
diff --git a/test/typeof6.ok b/test/typeof6.ok
new file mode 100644
index 00000000..b67e17ae
--- /dev/null
+++ b/test/typeof6.ok
@@ -0,0 +1 @@
+number