1
use Language::INTERCAL;
2
use Language::INTERCAL::Runtime::Library;
5
��@z�@L`@{��@�@{�����
6
��@z�@L`@�{��@�@{�����
11
������@z�@L`@{����@�@{�����
17
M�]@��@K�@L`@�z�J{����{�J{�����
24
fiddle Language::INTERCAL 'bug=0', 'ubug=0';
28
compile Language::INTERCAL 'prog', $prog;
30
eval { prog(0, \&foo) };
32
print $@ ? "not " : "", "ok 1\n";
33
print @foo == 7 ? "" : "not ", "ok 2\n";
34
print "VII\n" eq (shift @foo) ? "" : "not ", "ok 3\n";
35
print "XV\n" eq (shift @foo) ? "" : "not ", "ok 4\n";
36
print "xxxiiiXXIII\n" eq (shift @foo) ? "" : "not ", "ok 5\n";
37
print "CCLV\n" eq (shift @foo) ? "" : "not ", "ok 6\n";
38
print "\\M\\M\\C\\X\\L\\V\\I\\IcdlxxxiiiCMIII\n" eq (shift @foo)
39
? "" : "not ", "ok 7\n";
40
print "\\M\\M\\M\\C\\C\\X\\X\\IccxxvDCCXXVII\n" eq (shift @foo)
41
? "" : "not ", "ok 8\n";
42
print "MXXIII\n" eq (shift @foo) ? "" : "not ", "ok 9\n";
44
compile Language::INTERCAL 'prog_o', $prog, 'opt';
46
eval { prog_o(0, \&foo) };
48
print $@ ? "not " : "", "ok 10\n";
49
print @foo == 7 ? "" : "not ", "ok 11\n";
50
print "VII\n" eq (shift @foo) ? "" : "not ", "ok 12\n";
51
print "XV\n" eq (shift @foo) ? "" : "not ", "ok 13\n";
52
print "xxxiiiXXIII\n" eq (shift @foo) ? "" : "not ", "ok 14\n";
53
print "CCLV\n" eq (shift @foo) ? "" : "not ", "ok 15\n";
54
print "\\M\\M\\C\\X\\L\\V\\I\\IcdlxxxiiiCMIII\n" eq (shift @foo)
55
? "" : "not ", "ok 16\n";
56
print "\\M\\M\\M\\C\\C\\X\\X\\IccxxvDCCXXVII\n" eq (shift @foo)
57
? "" : "not ", "ok 17\n";
58
print "MXXIII\n" eq (shift @foo) ? "" : "not ", "ok 18\n";
60
compile Language::INTERCAL 'prog_q', $prog, 'quantum';
62
eval { prog_q(0, \&foo) };
64
print $@ ? "not " : "", "ok 19\n";
65
print @foo == 7 ? "" : "not ", "ok 20\n";
66
print "VII\n" eq (shift @foo) ? "" : "not ", "ok 21\n";
67
print "XV\n" eq (shift @foo) ? "" : "not ", "ok 22\n";
68
print "xxxiiiXXIII\n" eq (shift @foo) ? "" : "not ", "ok 23\n";
69
print "CCLV\n" eq (shift @foo) ? "" : "not ", "ok 24\n";
70
print "\\M\\M\\C\\X\\L\\V\\I\\IcdlxxxiiiCMIII\n" eq (shift @foo)
71
? "" : "not ", "ok 25\n";
72
print "\\M\\M\\M\\C\\C\\X\\X\\IccxxvDCCXXVII\n" eq (shift @foo)
73
? "" : "not ", "ok 26\n";
74
print "MXXIII\n" eq (shift @foo) ? "" : "not ", "ok 27\n";
76
compile Language::INTERCAL 'prog_p', $prog, 'post';
78
eval { prog_p(0, \&foo) };
80
print $@ ? "not " : "", "ok 28\n";
81
print @foo == 7 ? "" : "not ", "ok 29\n";
82
print "VII\n" eq (shift @foo) ? "" : "not ", "ok 30\n";
83
print "XV\n" eq (shift @foo) ? "" : "not ", "ok 31\n";
84
print "xxxiiiXXIII\n" eq (shift @foo) ? "" : "not ", "ok 32\n";
85
print "CCLV\n" eq (shift @foo) ? "" : "not ", "ok 33\n";
86
print "\\M\\M\\C\\X\\L\\V\\I\\IcdlxxxiiiCMIII\n" eq (shift @foo)
87
? "" : "not ", "ok 34\n";
88
print "\\M\\M\\M\\C\\C\\X\\X\\IccxxvDCCXXVII\n" eq (shift @foo)
89
? "" : "not ", "ok 35\n";
90
print "MXXIII\n" eq (shift @foo) ? "" : "not ", "ok 36\n";
92
compile Language::INTERCAL 'prog_qp', $prog, 'quantum', 'post';
94
eval { prog_qp(0, \&foo) };
96
print $@ ? "not " : "", "ok 37\n";
97
print @foo == 7 ? "" : "not ", "ok 38\n";
98
print "VII\n" eq (shift @foo) ? "" : "not ", "ok 39\n";
99
print "XV\n" eq (shift @foo) ? "" : "not ", "ok 40\n";
100
print "xxxiiiXXIII\n" eq (shift @foo) ? "" : "not ", "ok 41\n";
101
print "CCLV\n" eq (shift @foo) ? "" : "not ", "ok 42\n";
102
print "\\M\\M\\C\\X\\L\\V\\I\\IcdlxxxiiiCMIII\n" eq (shift @foo)
103
? "" : "not ", "ok 43\n";
104
print "\\M\\M\\M\\C\\C\\X\\X\\IccxxvDCCXXVII\n" eq (shift @foo)
105
? "" : "not ", "ok 44\n";
106
print "MXXIII\n" eq (shift @foo) ? "" : "not ", "ok 45\n";
108
compile Language::INTERCAL 'prog_d', $prog, 'dbhook';
110
_run_db(prog_d(0, \&foo));
112
print $@ ? "not " : "", "ok 46\n";
113
print @foo == 7 ? "" : "not ", "ok 47\n";
114
print "VII\n" eq (shift @foo) ? "" : "not ", "ok 48\n";
115
print "XV\n" eq (shift @foo) ? "" : "not ", "ok 49\n";
116
print "xxxiiiXXIII\n" eq (shift @foo) ? "" : "not ", "ok 50\n";
117
print "CCLV\n" eq (shift @foo) ? "" : "not ", "ok 51\n";
118
print "\\M\\M\\C\\X\\L\\V\\I\\IcdlxxxiiiCMIII\n" eq (shift @foo)
119
? "" : "not ", "ok 52\n";
120
print "\\M\\M\\M\\C\\C\\X\\X\\IccxxvDCCXXVII\n" eq (shift @foo)
121
? "" : "not ", "ok 53\n";
122
print "MXXIII\n" eq (shift @foo) ? "" : "not ", "ok 54\n";
125
push @foo, join('', @_);