home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
progpas
/
tspas18.arj
/
TSUNTC.TST
< prev
next >
Wrap
Text File
|
1990-02-25
|
1KB
|
61 lines
(* This is a test program for the TSUNTC.TPU unit
Updated 19-Aug-89, 12-Nov-89
*)
uses Dos,
Crt,
TSUNTC;
procedure LOGO;
begin
writeln;
writeln ('TSUNTC unit test by Prof. Timo Salmi, 19-Aug-89');
writeln ('University of Vaasa, Finland, ts@chyde.uwasa.fi');
writeln;
end;
(* Don't play it again, Sam *)
procedure TEST1;
const tune : array [1..7] of string[2]
= ('c ', 'd ', 'e ', 'f ', 'g ', 'a ', 'b ');
var i : byte;
begin
Delay (100);
for i := 1 to 7 do PLAYNOTE (tune[i], 4, 400);
PLAYNOTE ('c', 5, 400);
end; (* test1 *)
(* Printer status retort *)
procedure TEST3;
begin
if PRTONLFN then
writeln ('Printer ready')
else
writeln ('Printer not ready');
end; (* test3 *)
(* Number of disk devices *)
procedure TEST4;
begin
{$IFDEF VER50}
if Lo(DosVersion) < 3 then
begin writeln ('Not MsDos 3.+'); exit; end;
{$ENDIF}
writeln ('Number of disks in the system is ', DSKCNTFN);
end; (* test4 *)
(* Main program
If you don't want a particular test, comment it away.
Q: Why don't software firms test their programs properly themselves
but leave it to the gullible user?
A: Because it is such a testing task (do I detect audible groans :-)
*)
begin
LOGO;
TEST1;
REVCOLOR;
TEST3;
REVCOLOR;
TEST4;
end. (* tsuntc.tst *)