1
use Language::INTERCAL;
2
use Language::INTERCAL::Runtime::Library;
11
������@z�@L`@{������{�����
22
fiddle Language::INTERCAL 'bug=0', 'ubug=0';
26
compile Language::INTERCAL 'prog', $prog;
28
eval { prog(0, \&foo) };
30
print $@ ? "not " : "", "ok 1\n";
31
print @foo == 6 ? "" : "not ", "ok 2\n";
32
print "XVII\n" eq (shift @foo) ? "" : "not ", "ok 3\n";
33
print "XXXI\n" eq (shift @foo) ? "" : "not ", "ok 4\n";
34
print "XV\n" eq (shift @foo) ? "" : "not ", "ok 5\n";
35
print "lxvDXXXV\n" eq (shift @foo) ? "" : "not ", "ok 6\n";
36
print "XVII\n" eq (shift @foo) ? "" : "not ", "ok 7\n";
37
print "III\n" eq (shift @foo) ? "" : "not ", "ok 8\n";
39
compile Language::INTERCAL 'prog_o', $prog, 'opt';
41
eval { prog_o(0, \&foo) };
43
print $@ ? "not " : "", "ok 9\n";
44
print @foo == 6 ? "" : "not ", "ok 10\n";
45
print "XVII\n" eq (shift @foo) ? "" : "not ", "ok 11\n";
46
print "XXXI\n" eq (shift @foo) ? "" : "not ", "ok 12\n";
47
print "XV\n" eq (shift @foo) ? "" : "not ", "ok 13\n";
48
print "lxvDXXXV\n" eq (shift @foo) ? "" : "not ", "ok 14\n";
49
print "XVII\n" eq (shift @foo) ? "" : "not ", "ok 15\n";
50
print "III\n" eq (shift @foo) ? "" : "not ", "ok 16\n";
52
compile Language::INTERCAL 'prog_q', $prog, 'quantum';
54
eval { prog_q(0, \&foo) };
56
print $@ ? "not " : "", "ok 17\n";
57
print @foo == 6 ? "" : "not ", "ok 18\n";
58
print "XVII\n" eq (shift @foo) ? "" : "not ", "ok 19\n";
59
print "XXXI\n" eq (shift @foo) ? "" : "not ", "ok 20\n";
60
print "XV\n" eq (shift @foo) ? "" : "not ", "ok 21\n";
61
print "lxvDXXXV\n" eq (shift @foo) ? "" : "not ", "ok 22\n";
62
print "XVII\n" eq (shift @foo) ? "" : "not ", "ok 23\n";
63
print "III\n" eq (shift @foo) ? "" : "not ", "ok 24\n";
65
compile Language::INTERCAL 'prog_p', $prog, 'post';
67
eval { prog_p(0, \&foo) };
69
print $@ ? "not " : "", "ok 25\n";
70
print @foo == 6 ? "" : "not ", "ok 26\n";
71
print "XVII\n" eq (shift @foo) ? "" : "not ", "ok 27\n";
72
print "XXXI\n" eq (shift @foo) ? "" : "not ", "ok 28\n";
73
print "XV\n" eq (shift @foo) ? "" : "not ", "ok 29\n";
74
print "lxvDXXXV\n" eq (shift @foo) ? "" : "not ", "ok 30\n";
75
print "XVII\n" eq (shift @foo) ? "" : "not ", "ok 31\n";
76
print "III\n" eq (shift @foo) ? "" : "not ", "ok 32\n";
78
compile Language::INTERCAL 'prog_qp', $prog, 'quantum', 'post';
80
eval { prog_qp(0, \&foo) };
82
print $@ ? "not " : "", "ok 33\n";
83
print @foo == 6 ? "" : "not ", "ok 34\n";
84
print "XVII\n" eq (shift @foo) ? "" : "not ", "ok 35\n";
85
print "XXXI\n" eq (shift @foo) ? "" : "not ", "ok 36\n";
86
print "XV\n" eq (shift @foo) ? "" : "not ", "ok 37\n";
87
print "lxvDXXXV\n" eq (shift @foo) ? "" : "not ", "ok 38\n";
88
print "XVII\n" eq (shift @foo) ? "" : "not ", "ok 39\n";
89
print "III\n" eq (shift @foo) ? "" : "not ", "ok 40\n";
91
compile Language::INTERCAL 'prog_d', $prog, 'dbhook';
93
_run_db(prog_d(0, \&foo));
95
print $@ ? "not " : "", "ok 41\n";
96
print @foo == 6 ? "" : "not ", "ok 42\n";
97
print "XVII\n" eq (shift @foo) ? "" : "not ", "ok 43\n";
98
print "XXXI\n" eq (shift @foo) ? "" : "not ", "ok 44\n";
99
print "XV\n" eq (shift @foo) ? "" : "not ", "ok 45\n";
100
print "lxvDXXXV\n" eq (shift @foo) ? "" : "not ", "ok 46\n";
101
print "XVII\n" eq (shift @foo) ? "" : "not ", "ok 47\n";
102
print "III\n" eq (shift @foo) ? "" : "not ", "ok 48\n";
105
push @foo, join('', @_);