Ticket #1929: method-call.pir
| File method-call.pir, 492 bytes (added by plobsing, 2 years ago) |
|---|
| Line | |
|---|---|
| 1 | # Copyright (C) 2006-2009, Parrot Foundation. |
| 2 | # $Id$ |
| 3 | |
| 4 | .sub 'main' :main |
| 5 | # set up filehandle |
| 6 | $P0 = new ['FileHandle'] |
| 7 | $P0.'open'('/dev/null', 'w') |
| 8 | $P0.'puts'("null null null null null") |
| 9 | |
| 10 | push_eh OK |
| 11 | # expect incorrect number of parameters |
| 12 | $P1 = $P0.'flush'() |
| 13 | pop_eh |
| 14 | if_null $P1, OK |
| 15 | |
| 16 | NOK: |
| 17 | say "not ok" |
| 18 | end |
| 19 | |
| 20 | OK: |
| 21 | say "ok" |
| 22 | end |
| 23 | .end |
| 24 | |
| 25 | # Local Variables: |
| 26 | # mode: pir |
| 27 | # fill-column: 100 |
| 28 | # End: |
| 29 | # vim: expandtab shiftwidth=4 ft=pir: |
| 30 |
