summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/tests/mptest.mp
blob: 8136c5f4d989ac4cc49897253cbe5b2c407eed8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
% bug-test.mp -- Test for the presence or absence of known bugs.
%
% Ulrik Vieth, 1996/12/03.
%

% * String length bug: (reported to tex-implementors, 12/95)
% 
%   - if buggy, a string consisting of a single tab char |"^^I"| 
%     is reported to have length 3 instead of length 1

def show_length(expr s) =
  message("Length of string " & ditto & s & ditto);
  message("==> " & decimal(length(s)));
enddef;

message("* Test for string length bug:");

string s; s=char(9);
show_length(s);

string t; t="	"; % <-- tab char
show_length(t);


% * 8-bit chars in |btex ... etex|: (metafont@ens.fr, 11/95)
%
%   - if buggy, MP will complain about "Invalid character"
%
% (unfortunately can't assume dcr1000 is available; punt for now --karl.)

%message("* Test for 8-bit chars in btex...etex:");
%verbatimtex \font\dcr=dcr1000 etex;
%picture p;
%p = btex \dcr dv|DV\ etex; % <--  \"a\"o\"u\"A\"O\"U


% * big numbers in |btex ... etex|: (metafont@ens.fr, 10/96)
%
%   - if buggy, MP will complain about "Number too large (4096)"

message("* Test for big numbers in btex...etex:");
picture q;
q = btex $2^{12} = 4096 \qquad 2^{15} = 32768$ etex;

end.