aboutsummaryrefslogtreecommitdiffstats
path: root/test/arraysort.awk
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2011-05-04 23:39:43 +0300
committerArnold D. Robbins <arnold@skeeve.com>2011-05-04 23:39:43 +0300
commit1387c9a6046ba3a3e9ce8343daac42e1086efa6b (patch)
treed203a0f14aae778c0e907f1fca66c12fee3346e1 /test/arraysort.awk
parentf2b825c82aa6b0b2eabed734244148206f3c01a5 (diff)
downloadegawk-1387c9a6046ba3a3e9ce8343daac42e1086efa6b.tar.gz
egawk-1387c9a6046ba3a3e9ce8343daac42e1086efa6b.tar.bz2
egawk-1387c9a6046ba3a3e9ce8343daac42e1086efa6b.zip
Revamp array sorting.
Diffstat (limited to 'test/arraysort.awk')
-rw-r--r--test/arraysort.awk20
1 files changed, 10 insertions, 10 deletions
diff --git a/test/arraysort.awk b/test/arraysort.awk
index 09922044..b053a1d9 100644
--- a/test/arraysort.awk
+++ b/test/arraysort.awk
@@ -18,7 +18,7 @@ BEGIN {
BEGIN {
print "--- test2 ---"
a[100] = a[1] = a["x"] = a["y"] = 1
- PROCINFO["sorted_in"] = "num"
+ PROCINFO["sorted_in"] = "@ind_num_asc"
for (i in a)
print i, a[i]
delete a
@@ -27,7 +27,7 @@ BEGIN {
BEGIN {
print "--- test3 ---"
a[100] = a[1] = a["x"] = 1
- PROCINFO["sorted_in"] = "num"
+ PROCINFO["sorted_in"] = "@ind_num_asc"
for (i in a)
print i, a[i]
delete a
@@ -36,7 +36,7 @@ BEGIN {
BEGIN {
print "--- test4 ---"
a[0] = a[100] = a[1] = a["x"] = 1
- PROCINFO["sorted_in"] = "num"
+ PROCINFO["sorted_in"] = "@ind_num_asc"
for (i in a)
print i, a[i]
delete a
@@ -45,7 +45,7 @@ BEGIN {
BEGIN {
print "--- test5 ---"
a[""] = a["y"] = a[0] = 1
- PROCINFO["sorted_in"] = "num"
+ PROCINFO["sorted_in"] = "@ind_num_asc"
for (i in a)
print i, a[i]
delete a
@@ -54,7 +54,7 @@ BEGIN {
BEGIN {
print "--- test6 ---"
a[2] = a[1] = a[4] = a["3 "] = 1
- PROCINFO["sorted_in"] = "num"
+ PROCINFO["sorted_in"] = "@ind_num_asc"
for (i in a)
print "\""i"\""
delete a
@@ -67,24 +67,24 @@ BEGIN {
for (i = 1; i <= n; i++)
b[a[i]] = a[i]
print "--unsorted--"
- PROCINFO["sorted_in"] = "unsorted"
+ PROCINFO["sorted_in"] = "@unsorted"
for (i in b)
print "|"i"|"b[i]"|"
print "--asc ind str--"
- PROCINFO["sorted_in"] = "asc ind str"
+ PROCINFO["sorted_in"] = "@ind_str_asc"
for (i in b)
print "|"i"|"b[i]"|"
print "--asc val str--"
- PROCINFO["sorted_in"] = "asc val str"
+ PROCINFO["sorted_in"] = "@val_str_asc"
for (i in b)
print "|"i"|"b[i]"|"
print "--asc ind num--"
- PROCINFO["sorted_in"] = "asc ind num"
+ PROCINFO["sorted_in"] = "@ind_num_asc"
for (i in b)
print "|"i"|"b[i]"|"
print "--asc val num--"
- PROCINFO["sorted_in"] = "asc val num"
+ PROCINFO["sorted_in"] = "@val_num_asc"
for (i in b)
print "|"i"|"b[i]"|"
}