2 * This is a simple test program for all the different occurances of possible
3 * LOSTDIGITS conditions of Regina.
5 * Every error message is writen to standard error.
6 * One line is written to standard output on success.
8 * Return codes: 0 on success, 1 otherwise
13 call notify
'digits 5'
16 call notify
'digits 4'
25 signal on lostdigits name addlost
29 call error "LOSTDIGITS not raised in addition, but needs to"
34 call error "LOSTDIGITS raised in addition, but must not"
37 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
39 signal on lostdigits name sublost
43 call error "LOSTDIGITS not raised in subtraction, but needs to"
48 call error "LOSTDIGITS raised in subtraction, but must not"
51 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
53 signal on lostdigits name mullost
57 call error "LOSTDIGITS not raised in multiplication, but needs to"
62 call error "LOSTDIGITS raised in multiplication, but must not"
65 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
67 signal on lostdigits name fdivlost
71 call error "LOSTDIGITS not raised in decimal division, but needs to"
76 call error "LOSTDIGITS raised in decimal division, but must not"
79 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
81 signal on lostdigits name idivlost
85 call error "LOSTDIGITS not raised in integer division, but needs to"
90 call error "LOSTDIGITS raised in integer division, but must not"
93 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
95 signal on lostdigits name powlost
99 call error "LOSTDIGITS not raised in power expression, but needs to"
104 call error "LOSTDIGITS raised in power expression, but must not"
111 call lineout "<stderr>", arg(1)
117 written
= written
+ length(word) + 2
118 if written
>75 then do
119 written
= length(word)
122 call charout , word || ', '