Debian Codegraph @

texk/web2c/tests/mptest.mp

raw
1 % bug-test.mp -- Test for the presence or absence of known bugs.
2 %
3 % Ulrik Vieth, 1996/12/03.
4 %
5
6 % * String length bug: (reported to tex-implementors, 12/95)
7 %
8 % - if buggy, a string consisting of a single tab char |"^^I"|
9 % is reported to have length 3 instead of length 1
10
11 def show_length(expr s) =
12 message("Length of string " & ditto & s & ditto);
13 message("==> " & decimal(length(s)));
14 enddef;
15
16 message("* Test for string length bug:");
17
18 string s; s=char(9);
19 show_length(s);
20
21 string t; t=" "; % <-- tab char
22 show_length(t);
23
24
25 % * 8-bit chars in |btex ... etex|: ([email protected], 11/95)
26 %
27 % - if buggy, MP will complain about "Invalid character"
28 %
29 % (unfortunately can't assume dcr1000 is available; punt for now --karl.)
30
31 %message("* Test for 8-bit chars in btex...etex:");
32 %verbatimtex \font\dcr=dcr1000 etex;
33 %picture p;
34 %p = btex \dcr dv|DV\ etex; % <-- \"a\"o\"u\"A\"O\"U
35
36
37 % * big numbers in |btex ... etex|: ([email protected], 10/96)
38 %
39 % - if buggy, MP will complain about "Number too large (4096)"
40
41 message("* Test for big numbers in btex...etex:");
42 picture q;
43 q = btex $2^{12} = 4096 \qquad 2^{15} = 32768$ etex;
44
45 end.