aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorozan yigit <ozan.yigit@gmail.com>2021-11-03 22:34:20 -0400
committerozan yigit <ozan.yigit@gmail.com>2021-11-03 22:34:20 -0400
commit14c3fe42d2a93be3a4ceb1946f8bb7fcaf75ac4d (patch)
tree7189b839aa9e47d1f45633240258c0d080875b79
parent1debe1993fc852545a9215621d884be27f08a223 (diff)
downloadone-true-awk-14c3fe42d2a93be3a4ceb1946f8bb7fcaf75ac4d.tar.gz
updated FIXES, added getline corruption tests
-rw-r--r--bugs-fixed/getline-corruption.awk5
-rw-r--r--bugs-fixed/getline-corruption.in1
-rw-r--r--bugs-fixed/getline-corruption.ok1
3 files changed, 7 insertions, 0 deletions
diff --git a/bugs-fixed/getline-corruption.awk b/bugs-fixed/getline-corruption.awk
new file mode 100644
index 0000000..461e551
--- /dev/null
+++ b/bugs-fixed/getline-corruption.awk
@@ -0,0 +1,5 @@
+BEGIN {
+ getline l
+ getline l
+ print (s=substr(l,1,10)) " len=" length(s)
+}
diff --git a/bugs-fixed/getline-corruption.in b/bugs-fixed/getline-corruption.in
new file mode 100644
index 0000000..7898192
--- /dev/null
+++ b/bugs-fixed/getline-corruption.in
@@ -0,0 +1 @@
+a
diff --git a/bugs-fixed/getline-corruption.ok b/bugs-fixed/getline-corruption.ok
new file mode 100644
index 0000000..3efb545
--- /dev/null
+++ b/bugs-fixed/getline-corruption.ok
@@ -0,0 +1 @@
+a len=1