Add isptest (active) and In.Mod (not yet used).

This commit is contained in:
David Brown 2016-10-20 19:20:25 +01:00
parent a4c372253b
commit 1e7d3ca4fd
6 changed files with 1317 additions and 18 deletions

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,27 @@
MODULE isptest;
IMPORT Files, Texts, Out, Platform;
CONST path="isptest.mod";
VAR
T: Texts.Text;
R: Texts.Reader;
ch: CHAR;
i, j, k : LONGINT;
BEGIN
NEW(T);
IF Files.Old(path) # NIL THEN
Texts.Open(T, path);
Texts.OpenReader(R, T, 0); Texts.Read(R, ch);
WHILE ~R.eot DO
Texts.Read(R, ch);
i := Texts.Pos(R);
Out.String("pos="); Out.Int(i,0); Out.String(" char="); Out.Char(ch); Out.Ln;
IF i = 21906 THEN
Out.String("21906"); Out.Ln;
(*Platform.Delay(10000);*)
END;
END;
END
END isptest.

View file

@ -0,0 +1,13 @@
#!/bin/sh
. ../testenv.sh
$OBECOMP isptest.mod -m -O2
./isptest >result-O2
$OBECOMP isptest.mod -m -OC
./isptest >result-OC
echo --- Testing with Oberon 2 variable model --- >result
cat result-O2 >>result
echo "" >>result
echo "" >>result
echo --- Testing with Component Pascal variable model --- >>result
cat result-OC >>result
. ../testresult.sh