diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2011-04-01 11:58:20 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2011-04-01 11:58:20 +0300 |
commit | d806340faadd79524b3adccef6cbced20cd88396 (patch) | |
tree | 31ff37862e0603576bf3c0111149af70ff7578ef /test/arraysort.awk | |
parent | 6aed27e0a553cb31800bbaeee1bf8e96a98abb12 (diff) | |
download | gawk-d806340faadd79524b3adccef6cbced20cd88396.tar.gz |
Fix array sorting, add test case.
Diffstat (limited to 'test/arraysort.awk')
-rw-r--r-- | test/arraysort.awk | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/arraysort.awk b/test/arraysort.awk new file mode 100644 index 00000000..28535528 --- /dev/null +++ b/test/arraysort.awk @@ -0,0 +1,11 @@ +# Date: Thu, 31 Mar 2011 12:29:09 -0600 +# From: j.eh@mchsi.com + +BEGIN { a[100]=a[1]=a["x"]=a["y"]=1; PROCINFO["sorted_in"]="num"; +for (i in a) print i, a[i] } + +BEGIN { a[100]=a[1]=a["x"]=1; PROCINFO["sorted_in"]="num"; +for (i in a) print i, a[i] } + +BEGIN { a[0]=a[100]=a[1]=a["x"]=1; PROCINFO["sorted_in"]="num"; +for (i in a) print i, a[i] } |