source: trunk/essentials/sys-apps/gawk/test/gsubasgn.awk

Last change on this file was 3076, checked in by bird, 18 years ago

gawk 3.1.5

File size: 302 bytes
Line 
1# tests for assigning to a function within that function
2
3#1 - should be bad
4function test1 (r) { gsub(r, "x", test1) }
5BEGIN { test1("") }
6
7#2 - should be bad
8function test2 () { gsub(/a/, "x", test2) }
9BEGIN { test2() }
10
11#3 - should be ok
12function test3 (r) { gsub(/a/, "x", r) }
13BEGIN { test3("") }
Note: See TracBrowser for help on using the repository browser.