diff -Nbu test/.snapshot/nightly.0/Makefile.am test/Makefile.am --- test/.snapshot/nightly.0/Makefile.am 2006-07-03 16:38:01.433946000 -0400 +++ test/Makefile.am 2006-07-11 10:36:46.320983000 -0400 @@ -141,6 +141,9 @@ delarpm2.ok \ delfunc.awk \ delfunc.ok \ + devfd.in4 \ + devfd.in5 \ + devfd.ok \ dynlj.awk \ dynlj.ok \ eofsplit.awk \ @@ -575,6 +578,16 @@ whiny.awk \ whiny.in \ whiny.ok \ + wideidx.awk \ + wideidx.in \ + wideidx.ok \ + widesub.awk \ + widesub.ok \ + widesub2.awk \ + widesub2.ok \ + widesub3.awk \ + widesub3.in \ + widesub3.ok \ wjposer1.awk \ wjposer1.in \ wjposer1.ok \ @@ -631,10 +644,10 @@ rstest2 rstest3 rstest4 rstest5 rswhite scalar sclforin sclifin \ sortempty splitargv splitarr splitdef splitvar splitwht sprintfc \ strcat1 strtod subamp subsepnm subslash substr swaplns synerr1 tradanch \ - tweakfld uninit2 uninit3 uninit4 uninitialized unterm wjposer1 \ - zeroe0 zeroflag + tweakfld uninit2 uninit3 uninit4 uninitialized unterm wideidx widesub \ + widesub2 widesub3 wjposer1 zeroe0 zeroflag -UNIX_TESTS = fflush getlnhd pid pipeio1 pipeio2 poundbang space strftlng +UNIX_TESTS = devfd fflush getlnhd pid pipeio1 pipeio2 poundbang space strftlng GAWK_EXT_TESTS = argtest asort asorti backw badargs clos1way fieldwdth fsfwfs \ gensub gensub2 gnuops2 gnuops3 gnureops icasefs icasers igncdym igncfs ignrcase \ @@ -876,6 +889,11 @@ @echo ab | $(AWK) --traditional -f $(srcdir)/litoct.awk >_$@ @-$(CMP) $(srcdir)/litoct.ok _$@ && rm -f _$@ +devfd:: + @echo $@ + @$(AWK) 1 /dev/fd/4 /dev/fd/5 4<$(srcdir)/devfd.in4 5<$(srcdir)/devfd.in5 >_$@ 2>&1 || echo EXIT CODE: $$? >> _$@ + @-$(CMP) $(srcdir)/address@hidden _$@ && rm -f _$@ + fflush:: @echo $@ @$(srcdir)/fflush.sh >_$@ diff -Nbu test/.snapshot/nightly.0/devfd.in4 test/devfd.in4 --- test/.snapshot/nightly.0/devfd.in4 1969-12-31 19:00:00.000000000 -0500 +++ test/devfd.in4 2006-07-11 10:32:24.329312000 -0400 @@ -0,0 +1 @@ +file on fd 4 diff -Nbu test/.snapshot/nightly.0/devfd.in5 test/devfd.in5 --- test/.snapshot/nightly.0/devfd.in5 1969-12-31 19:00:00.000000000 -0500 +++ test/devfd.in5 2006-07-11 10:32:28.001396000 -0400 @@ -0,0 +1 @@ +file on fd 5 diff -Nbu test/.snapshot/nightly.0/devfd.ok test/devfd.ok --- test/.snapshot/nightly.0/devfd.ok 1969-12-31 19:00:00.000000000 -0500 +++ test/devfd.ok 2006-07-11 10:32:46.932819000 -0400 @@ -0,0 +1,2 @@ +file on fd 4 +file on fd 5 diff -Nbu test/.snapshot/nightly.0/wideidx.awk test/wideidx.awk --- test/.snapshot/nightly.0/wideidx.awk 1969-12-31 19:00:00.000000000 -0500 +++ test/wideidx.awk 2006-07-11 09:54:19.417821000 -0400 @@ -0,0 +1,7 @@ +{ + a=$0 + print index(a,"b") + getline + a = a $0 + print index(a,"b") +} diff -Nbu test/.snapshot/nightly.0/wideidx.in test/wideidx.in --- test/.snapshot/nightly.0/wideidx.in 1969-12-31 19:00:00.000000000 -0500 +++ test/wideidx.in 2006-07-11 09:53:48.203233000 -0400 @@ -0,0 +1,2 @@ +foo +bar diff -Nbu test/.snapshot/nightly.0/wideidx.ok test/wideidx.ok --- test/.snapshot/nightly.0/wideidx.ok 1969-12-31 19:00:00.000000000 -0500 +++ test/wideidx.ok 2006-07-11 09:54:25.174930000 -0400 @@ -0,0 +1,2 @@ +0 +4 diff -Nbu test/.snapshot/nightly.0/widesub.awk test/widesub.awk --- test/.snapshot/nightly.0/widesub.awk 1969-12-31 19:00:00.000000000 -0500 +++ test/widesub.awk 2006-07-11 09:52:53.163934000 -0400 @@ -0,0 +1,12 @@ +BEGIN { + str = "type=\"directory\" version=\"1.0\"" + #print "BEGIN:", str + + while (str) { + sub(/^[^=]*/, "", str); + s = substr(str, 2) + print s + sub(/^="[^"]*"/, "", str) + sub(/^[ \t]*/, "", str) + } +} diff -Nbu test/.snapshot/nightly.0/widesub.ok test/widesub.ok --- test/.snapshot/nightly.0/widesub.ok 1969-12-31 19:00:00.000000000 -0500 +++ test/widesub.ok 2006-07-11 09:53:00.408202000 -0400 @@ -0,0 +1,2 @@ +"directory" version="1.0" +"1.0" diff -Nbu test/.snapshot/nightly.0/widesub2.awk test/widesub2.awk --- test/.snapshot/nightly.0/widesub2.awk 1969-12-31 19:00:00.000000000 -0500 +++ test/widesub2.awk 2006-07-11 09:56:26.832721000 -0400 @@ -0,0 +1,9 @@ +BEGIN { + Value = "abc" + + print "Before <" Value "> ", index( Value, "bc" ) + + sub( /bc/, "bbc", Value ) + + print "After <" Value ">", index( Value, "bc" ) +} diff -Nbu test/.snapshot/nightly.0/widesub2.ok test/widesub2.ok --- test/.snapshot/nightly.0/widesub2.ok 1969-12-31 19:00:00.000000000 -0500 +++ test/widesub2.ok 2006-07-11 09:56:45.656138000 -0400 @@ -0,0 +1,2 @@ +Before 2 +After 3 diff -Nbu test/.snapshot/nightly.0/widesub3.awk test/widesub3.awk --- test/.snapshot/nightly.0/widesub3.awk 1969-12-31 19:00:00.000000000 -0500 +++ test/widesub3.awk 2006-07-11 09:57:52.898532000 -0400 @@ -0,0 +1,6 @@ +{ + if (substr($1,1,1) == substr($0,1,1)) + print "substr matches" + sub(/foo/,"bar") + print nr++ +} diff -Nbu test/.snapshot/nightly.0/widesub3.in test/widesub3.in --- test/.snapshot/nightly.0/widesub3.in 1969-12-31 19:00:00.000000000 -0500 +++ test/widesub3.in 2006-07-11 09:57:57.345670000 -0400 @@ -0,0 +1,2 @@ +test +foo diff -Nbu test/.snapshot/nightly.0/widesub3.ok test/widesub3.ok --- test/.snapshot/nightly.0/widesub3.ok 1969-12-31 19:00:00.000000000 -0500 +++ test/widesub3.ok 2006-07-11 09:58:10.845976000 -0400 @@ -0,0 +1,4 @@ +substr matches +0 +substr matches +1