~vcs-imports/gawk/master

« back to all changes in this revision

Viewing changes to test/rwarray.awk

  • Committer: Arnold D. Robbins
  • Date: 2016-11-29 18:32:29 UTC
  • mto: (731.14.2) (1056.1.1)
  • mto: This revision was merged to the branch mainline in revision 742.
  • Revision ID: git-v1:bf847b770dec8fd2e364a56abc8618987b9de917
Add regex value support to API. Update rwarr extension and test.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
        while ((getline word) > 0)
5
5
                dict[word] = word word
6
6
 
 
7
        dict["/typed-regex/"] = @/search me/
 
8
 
7
9
        n = asorti(dict, dictindices)
8
10
        for (i = 1; i <= n; i++)
9
11
                printf("dict[%s] = %s\n", dictindices[i], dict[dictindices[i]]) > "orig.out"
12
14
        ret = writea("orig.bin", dict)
13
15
        printf "writea() returned %d, expecting 1\n", ret
14
16
 
15
 
 
16
17
        ret = reada("orig.bin", dict)
17
18
        printf "reada() returned %d, expecting 1\n", ret
18
19