1 #include <aros/debug.h>
5 CONST_STRPTR scriptname
;
15 int main(int argc
, char **argv
)
19 scriptname
= "testscript";
27 PutStr("Usage runtest [scriptfile]\n");
30 scripthandle
= Open(scriptname
, MODE_OLDFILE
);
33 PutStr("Can't open file\n");
37 PutStr("Reading commands from file ");
39 PutStr("\nOutput will be sent to the debugging console\n\n");
41 while (FGets(scripthandle
, command
, sizeof command
))
43 if (command
[0] != '#' && command
[0] != '\n')
45 bug("====================================\n");
46 bug("Running command: %s", command
);
47 error
= SystemTagList(command
, NULL
);
48 bug("returns: %d\n", error
);
52 else if (error
> 100 || error
< 0)
54 else if (error
>= RETURN_FAIL
)
56 else if (error
>= RETURN_ERROR
)
58 else if (error
>= RETURN_WARN
)
64 bug("====================================\n");
65 bug("Summary: ok %d, warn %d, error %d, fail %d, no Shell %d, rubbish %d\n",
66 okcnt
, warncnt
, errorcnt
, failcnt
, noshellcnt
, rubbishcnt
);