ack/tests/plat/bugs/bug-22-inn_mod.mod

22 lines
329 B
Modula-2
Raw Permalink Normal View History

2016-12-06 21:07:22 +00:00
MODULE test;
FROM Test IMPORT fail, finished;
2016-12-06 21:07:22 +00:00
TYPE charset = SET OF CHAR;
PROCEDURE Space(c: CHAR): BOOLEAN;
BEGIN
RETURN c IN charset{' ', 11C, 12C, 15C}
END Space;
BEGIN
IF Space('a') THEN
fail(1);
2016-12-06 21:07:22 +00:00
END;
IF NOT Space(' ') THEN
fail(2);
2016-12-06 21:07:22 +00:00
END;
IF NOT Space(12C) THEN
fail(3);
2016-12-06 21:07:22 +00:00
END;
finished;
2016-12-06 21:07:22 +00:00
END test.