~ubuntu-branches/ubuntu/trusty/clc-intercal/trusty-proposed

« back to all changes in this revision

Viewing changes to t/13select.t

  • Committer: Bazaar Package Importer
  • Author(s): Mark Brown
  • Date: 2006-10-08 13:30:54 UTC
  • mfrom: (1.1.1 upstream) (3.1.1 dapper)
  • Revision ID: james.westby@ubuntu.com-20061008133054-fto70u71yoyltr3m
Tags: 1:1.0~2pre1.-94.-4.1-1
* New upstream release.
* Change to dh_installman.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
use Language::INTERCAL;
2
 
use Language::INTERCAL::Runtime::Library;
3
 
 
4
 
my $prog = '
5
 
��@z�@L`@{���{���
6
 
��@z�@L`@{����{���
7
 
������@z�@L`@{���{���
8
 
��@����@���@z�
9
 
��@����@���@z�
10
 
������@����@���@z�
11
 
������@z�@L`@{������{�����
12
 
������@����@���@z�
13
 
��@z�@L`@z�@�@z�
14
 
��@����@���@z�
15
 
��@z�@L`@z�@�@z�
16
 
��@����@���@z�
17
 
��@����@��
18
 
';
19
 
 
20
 
print "1..48\n";
21
 
 
22
 
fiddle Language::INTERCAL 'bug=0', 'ubug=0';
23
 
 
24
 
my @foo;
25
 
 
26
 
compile Language::INTERCAL 'prog', $prog;
27
 
@foo= ();
28
 
eval { prog(0, \&foo) };
29
 
print STDERR $@;
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";
38
 
 
39
 
compile Language::INTERCAL 'prog_o', $prog, 'opt';
40
 
@foo= ();
41
 
eval { prog_o(0, \&foo) };
42
 
print STDERR $@;
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";
51
 
 
52
 
compile Language::INTERCAL 'prog_q', $prog, 'quantum';
53
 
@foo= ();
54
 
eval { prog_q(0, \&foo) };
55
 
print STDERR $@;
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";
64
 
 
65
 
compile Language::INTERCAL 'prog_p', $prog, 'post';
66
 
@foo= ();
67
 
eval { prog_p(0, \&foo) };
68
 
print STDERR $@;
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";
77
 
 
78
 
compile Language::INTERCAL 'prog_qp', $prog, 'quantum', 'post';
79
 
@foo= ();
80
 
eval { prog_qp(0, \&foo) };
81
 
print STDERR $@;
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";
90
 
 
91
 
compile Language::INTERCAL 'prog_d', $prog, 'dbhook';
92
 
@foo = ();
93
 
_run_db(prog_d(0, \&foo));
94
 
print STDERR $@;
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";
103
 
 
104
 
sub foo {
105
 
    push @foo, join('', @_);
106
 
}
107