home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / gnuawk.zip / test / gsubasgn.awk < prev    next >
Text File  |  1996-09-10  |  302b  |  14 lines

  1. # tests for assigning to a function within that function
  2.  
  3. #1 - should be bad
  4. function test1 (r) { gsub(r, "x", test1) }
  5. BEGIN { test1("") }
  6.  
  7. #2 - should be bad
  8. function test2 () { gsub(/a/, "x", test2) }
  9. BEGIN { test2() }
  10.  
  11. #3 - should be ok
  12. function test3 (r) { gsub(/a/, "x", r) }
  13. BEGIN { test3("") }
  14.