Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
| 1 |
#! /usr/bin/crm |
| 2 |
# |
| 3 |
# fataltraptest.crm - test trap statement |
| 4 |
|
| 5 |
# Copyright 2009 William S. Yerazunis. |
| 6 |
# This file is under GPLv3, as described in COPYING. |
| 7 |
|
| 8 |
# test the trap statement |
| 9 |
window |
| 10 |
output / :*:_nl: CRM114 testing FAULT\/TRAP... :*:_nl: / |
| 11 |
output / --- you should not see an error yet --- :*:_nl:/ |
| 12 |
{ |
| 13 |
{ |
| 14 |
output / you should see this -->/ |
| 15 |
} |
| 16 |
{ |
| 17 |
trap /.*/ |
| 18 |
output / BUT YOU SHOULD NOT SEE THIS / |
| 19 |
} |
| 20 |
output /<--and this, with nothing in between. :*:_nl: :*:_nl:/ |
| 21 |
} |
| 22 |
output / --- the next thing you see SHOULD be an error "unable to read-open"--- :*:_nl:/ |
| 23 |
{ |
| 24 |
{ |
| 25 |
input [zoob.zipulrlfjf] (:hi:) |
| 26 |
} |
| 27 |
trap (:my_fault:) /.*/ |
| 28 |
{ |
| 29 |
output / Caught the error - fault text was :*:my_fault: / |
| 30 |
} |
| 31 |
} |
| 32 |
output / --- and again, the next thing you see SHOULD be an error "unable to write-open"--- :*:_nl:/ |
| 33 |
{ |
| 34 |
{ |
| 35 |
output [/No/Such/Directory/frotz.mumble] (:hi:) |
| 36 |
} |
| 37 |
trap (:my_fault:) /.*/ |
| 38 |
{ |
| 39 |
output / Caught the error - fault text was :*:my_fault: / |
| 40 |
} |
| 41 |
} |
| 42 |
output /:*:_nl:/ |