aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog4
-rw-r--r--test/profile2.ok10
-rw-r--r--test/xref.awk6
3 files changed, 11 insertions, 9 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index 03262534..88c0f137 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,7 @@
+Thu Jan 27 22:03:22 2011 John Haque <j.eh@mchsi.com>
+
+ * xref.awk, profile2.ok: Fixed to be character set independent.
+
Sun Dec 26 13:54:21 2010 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.am (EXTRA_DIST): Include profile2.ok in the list. Oops.
diff --git a/test/profile2.ok b/test/profile2.ok
index 11dccdcd..6217fcd0 100644
--- a/test/profile2.ok
+++ b/test/profile2.ok
@@ -97,14 +97,12 @@
}
}
- 434 function inarray(val, arr, j)
+ 434 function inarray(val, arr, j, tmp)
{
- 11003 for (j in arr) {
- 11003 if (arr[j] == val) { # 387
- 387 return j
- }
+ 16297 for (j in arr) {
+ 16297 tmp[arr[j]]++
}
- 47 return ""
+ 434 return (val in tmp)
}
571 function lex()
diff --git a/test/xref.awk b/test/xref.awk
index 5c3f192b..6e562913 100644
--- a/test/xref.awk
+++ b/test/xref.awk
@@ -94,10 +94,10 @@
function asplit(str,arr,fs, n) { n = split(str,temp_asplit,fs)
for ( i = 1; i <= n; i++ ) arr[temp_asplit[i]]++ }
- function inarray(val,arr, j) {
+ function inarray(val,arr, j, tmp) {
for ( j in arr )
- if ( arr[j] == val ) return j
- return "" }
+ tmp[arr[j]]++
+ return (val in tmp) }
function lex() {