Subversion Repositories wimsdev

Rev

Rev 12271 | Rev 12363 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 12271 Rev 12288
Line 1157... Line 1157...
1157
      if(strcasecmp(argv[1],"defaults")==0) {
1157
      if(strcasecmp(argv[1],"defaults")==0) {
1158
          config_defaults(); return 0;
1158
          config_defaults(); return 0;
1159
      }
1159
      }
1160
      if(strcasecmp(argv[1],"test")==0) {
1160
      if(strcasecmp(argv[1],"test")==0) {
1161
/* launches a test suite */
1161
/* launches a test suite */
1162
         if (argc < 5) {
1162
        if (argc < 5) {
1163
           printf("Not enough arguments to launch a test; usage:\n");
1163
          printf("Not enough arguments to launch a test; usage:\n");
1164
           printf("wims test path_to_file name_of_proc_file 'var1 var2 ...'\n\n");
1164
          printf("wims test path_to_file name_of_proc_file 'var1 var2 ...'\n\n");
1165
           printf("the file at path_to_file/name_of_proc_file will be evaluated by wims for\nexec commands, then the values of var1, var2, ... will be printed\nin the standard output, one per line.\n");
1165
          printf("the file at path_to_file/name_of_proc_file will be evaluated by wims for\nexec commands, then the values of var1, var2, ... will be printed\nin the standard output, one per line.\n");
1166
           return 1;
1166
          return 1;
1167
         }
1167
        }
1168
         test_suite(argv[2], argv[3], argv[4]);
1168
        test_suite(argv[2], argv[3], argv[4]);
1169
         return 0;
1169
        return 0;
1170
       }
1170
      }
1171
    }
1171
    }
1172
    p=getenv("SERVER_SOFTWARE"); if(p!=NULL && strcasecmp(p,"WIMS")==0)
1172
    p=getenv("SERVER_SOFTWARE"); if(p!=NULL && strcasecmp(p,"WIMS")==0)
1173
      httpd_type=httpd_wims;
1173
      httpd_type=httpd_wims;
1174
    p=getenv("REMOTE_ADDR"); if(p!=NULL) remote_addr=p;
1174
    p=getenv("REMOTE_ADDR"); if(p!=NULL) remote_addr=p;
1175
    p=getenv("REMOTE_HOST"); if(p!=NULL) remote_host=p;
1175
    p=getenv("REMOTE_HOST"); if(p!=NULL) remote_host=p;