# New Ticket Created by Stefan Lidman # Please include the string: [perl #25129] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=25129 >
Hello This is a test for the buffer bug that was discussed on p6i a few days ago. It does not remove the test file it makes because I do not know a good way to do this. /Stefan output_is(<<'CODE', <<OUTPUT, "Buffer test"); set S0, "buffTest" open P1, S0 set I0, 0 set I2, 10000 LOOP: gt I0, I2, DONE set S1, I0 concat S1, S1, " " print P1, S1 inc I0 mod I6, I0, 20 unless I6, NEW_L branch LOOP NEW_L: print P1, "\n" branch LOOP DONE: print P1, "\n" close P1 PART_2: open P1, S0 set I0, 0 LINE: readline S1, P1 unless S1, SUCCESS chopn S1, 1 NEXT_NR: length I1, S1 le I1, 1, LINE set S2, "" SPLIT: substr S3, S1, 0, 1 substr S1, 0, 1, "" eq S3, " ", GOT_NR concat S2, S2, S3 branch SPLIT GOT_NR: set I1, S2 ne I0, I1, FAILED inc I0 branch NEXT_NR FAILED: print "Failed\n" branch EXIT SUCCESS: print "Successful\n" EXIT: end CODE Successful OUTPUT