Changeset 1cf3f8d3 for tester.c


Ignore:
Timestamp:
Jul 7, 2007, 5:42:45 PM (13 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, barnowl_perlaim, debian, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
535d68b
Parents:
9a6cc40
Message:
Make the built-in regression tests output TAP and add a perl wrapper
to call it.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tester.c

    re7dc035 r1cf3f8d3  
    143143
    144144
     145#define OWL_DICT_NTESTS  20
     146#define OWL_UTIL_NTESTS  9
     147#define OWL_OBARRAY_NTESTS  5
     148#define OWL_VARIABLE_NTESTS  52
     149#define OWL_FILTER_NTESTS  23
     150
    145151int main(int argc, char **argv, char **env)
    146152{
     
    149155
    150156  int numfailures=0;
    151   if (argc==2 && 0==strcmp(argv[1],"reg")) {
     157  if (argc==1 || (argc==2 && 0==strcmp(argv[1],"reg"))) {
     158    printf("1..%d\n", OWL_UTIL_NTESTS+OWL_DICT_NTESTS+OWL_VARIABLE_NTESTS
     159           +OWL_FILTER_NTESTS+OWL_OBARRAY_NTESTS);
    152160    numfailures += owl_util_regtest();
    153161    numfailures += owl_dict_regtest();
     
    156164    numfailures += owl_obarray_regtest();
    157165    if (numfailures) {
    158       fprintf(stderr, "*** WARNING: %d failures total\n", numfailures);
     166      fprintf(stderr, "# *** WARNING: %d failures total\n", numfailures);
    159167    }
    160168    return(numfailures);
Note: See TracChangeset for help on using the changeset viewer.