+sub enlist_new_test ($$$$$$) {
+
+ my ($regression_tests, $token, $value, $si, $ri, $number) = @_;
+
+ if ($token eq 'set header') {
+
+ l(LL_FILE_LOADING, "Header to set: " . $value);
+ ${$regression_tests}[$si][$ri]{'type'} = CLIENT_HEADER_TEST;
+ # Implicit default
+ $$regression_tests[$si][$ri]{'level'} = CLIENT_HEADER_TEST;
+
+ } elsif ($token eq 'request header') {
+
+ l(LL_FILE_LOADING, "Header to request: " . $value);
+ $$regression_tests[$si][$ri]{'type'} = SERVER_HEADER_TEST;
+ # Implicit default
+ $$regression_tests[$si][$ri]{'expected-status-code'} = 200;
+ $$regression_tests[$si][$ri]{'level'} = SERVER_HEADER_TEST;
+
+ } elsif ($token eq 'trusted cgi request') {
+
+ l(LL_FILE_LOADING, "CGI URL to test in a dumb way: " . $value);
+ $$regression_tests[$si][$ri]{'type'} = TRUSTED_CGI_REQUEST;
+ # Implicit default
+ $$regression_tests[$si][$ri]{'expected-status-code'} = 200;
+ $$regression_tests[$si][$ri]{'level'} = TRUSTED_CGI_REQUEST;
+
+ } elsif ($token eq 'fetch test') {
+
+ l(LL_FILE_LOADING, "URL to test in a dumb way: " . $value);
+ $$regression_tests[$si][$ri]{'type'} = DUMB_FETCH_TEST;
+ # Implicit default
+ $$regression_tests[$si][$ri]{'expected-status-code'} = 200;
+ $$regression_tests[$si][$ri]{'level'} = DUMB_FETCH_TEST;
+
+ } elsif ($token eq 'method test') {
+
+ l(LL_FILE_LOADING, "Method to test: " . $value);
+ $$regression_tests[$si][$ri]{'type'} = METHOD_TEST;
+ # Implicit default
+ $$regression_tests[$si][$ri]{'expected-status-code'} = 200;
+ $$regression_tests[$si][$ri]{'level'} = METHOD_TEST;
+
+ } else {
+
+ die "Incomplete '" . $token . "' support detected.";
+
+ }
+
+ check_for_forbidden_characters($value);
+
+ $$regression_tests[$si][$ri]{'data'} = $value;
+
+ # For function that only get passed single tests
+ $$regression_tests[$si][$ri]{'section-id'} = $si;
+ $$regression_tests[$si][$ri]{'regression-test-id'} = $ri;
+ $$regression_tests[$si][$ri]{'number'} = $number - 1;
+ l(LL_FILE_LOADING,
+ "Regression test " . $number . " (section:" . $si . "):");
+}
+