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
|
() = evalfile ("./test.sl");
% TODO:
% The test plan is to write output to a file and compare that output to a
% validated output file. Such a test cannot rely upon using a system
% provided terminfo database, which could vary from system to system.
% As such, a TERMCAP environment variable will be used.
try
{
if (NULL == getenv("TERM"))
{
() = fprintf (stderr, "TERM environment variable not set--- slsmg-module test not performed\n");
exit (0);
}
#if$TERM unknown
() = fprintf (stderr, "TERM is unknown-- slsmg-module not tested\n");
exit (0);
#endif
require ("slsmg");
}
catch ImportError:
{
() = fprintf (stderr, "slsmg-module not available. Test not performed\n");
exit (1);
}
private define test_smg ()
{
slsmg_init_smg ();
slsmg_refresh ();
variable line;
() = fgets (&line, stdin);
slsmg_reset_smg ();
}
define slsh_main ()
{
testing_module ("slsmg"); ()=fputs("(module loaded)...", stdout);
%test_smg ();
end_test ();
}
|