source:
trunk/essentials/sys-apps/gawk/test/nasty2.awk
Last change on this file was 3076, checked in by , 18 years ago | |
---|---|
File size: 247 bytes |
Line | |
---|---|
1 | # Based on nasty.awk, test same thing for printf |
2 | # |
3 | BEGIN { |
4 | a="aaaaa" |
5 | a=a a #10 |
6 | a=a a #20 |
7 | a=a a #40 |
8 | a=a a #80 |
9 | a=a a #160 |
10 | a=a a # i.e. a is long enough |
11 | |
12 | printf("a = %s, f() = %s\n", a, f()) |
13 | print a |
14 | } |
15 | |
16 | function f() |
17 | { |
18 | gsub(/a/, "123", a) |
19 | return "X" |
20 | } |
Note:
See TracBrowser
for help on using the repository browser.