Sha256: b91871195196937d0f61201706854a7676f45803c37ecb2497dadef65dcd57ea

Contents?: true

Size: 1.2 KB

Versions: 21

Compression:

Stored size: 1.2 KB

Contents

package http_parser.lolevel;

import http_parser.HTTPParserUrl;
import static http_parser.lolevel.Util.*;

public class ParseUrl {
  public static void test(int i) {
    HTTPParserUrl u = new HTTPParserUrl();
    HTTPParser p = new HTTPParser();
    Url test = Url.URL_TESTS[i];
//    System.out.println(":: " + test.name);
    int rv = p.parse_url(Util.buffer(test.url),test.is_connect,u);
    UnitTest.check_equals(rv, test.rv);
    if(test.rv == 0){
      UnitTest.check_equals(u, test.u);
    }

  }
  public static void test() {
    p(ParseUrl.class);

    for (int i = 0; i < Url.URL_TESTS.length; i++) {
      test(i);      
    }
  }
  
  static void usage() {
    p("usage: [jre] http_parser.lolevel.ParseUrl [i]");
    p("             i : optional test case id");
    p("---------------------------------------------");
    p("Test Cases:");
    for (int i =0; i!= Url.URL_TESTS.length; ++i) {
      p(" "+i+": "+Url.URL_TESTS[i].name);
    }
  }

  public static void main (String [] args) {
    if (0 == args.length) {
      test();
    } else {
      try {
        int i = Integer.parseInt(args[0]);
        test(i);
      } catch (Throwable t) {
        t.printStackTrace();
        usage();
      }
    
    }
  }
}

Version data entries

21 entries across 21 versions & 7 rubygems

Version Path
fluent-plugin-nuopenlineage-light-0.1.0 vendor/bundle/ruby/3.3.0/gems/http_parser.rb-0.8.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/ParseUrl.java
fluent-plugin-openlineage-light-0.1.4 vendor/bundle/ruby/3.3.0/gems/http_parser.rb-0.8.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/ParseUrl.java
fluent-plugin-openlineage-light-0.1.3 vendor/bundle/ruby/3.3.0/gems/http_parser.rb-0.8.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/ParseUrl.java
fluent-plugin-openlineage-0.1.0 vendor/bundle/ruby/3.3.0/gems/http_parser.rb-0.8.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/ParseUrl.java
fluent-plugin-google-cloud-logging-on-prem-0.1.0 vendor/ruby/3.1.0/gems/http_parser.rb-0.8.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/ParseUrl.java
http_parser.rb-0.8.0 ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/ParseUrl.java
http_parser.rb-0.7.0 ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/ParseUrl.java
fluent-plugin-detect-memb-exceptions-0.0.2 vendor/bundle/ruby/2.0.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/ParseUrl.java
fluent-plugin-detect-memb-exceptions-0.0.1 vendor/bundle/ruby/2.0.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/ParseUrl.java
midori_http_parser-0.6.1.3 ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/ParseUrl.java
midori_http_parser-0.6.1.3-java ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/ParseUrl.java
midori_http_parser-0.6.1.2-java ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/ParseUrl.java
midori_http_parser-0.6.1.2 ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/ParseUrl.java
midori_http_parser-0.6.1.1-java ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/ParseUrl.java
midori_http_parser-0.6.1.1 ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/ParseUrl.java
midori_http_parser-0.6.1 ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/ParseUrl.java
http_parser.rb-0.6.0-java ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/ParseUrl.java
http_parser.rb-0.6.0 ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/ParseUrl.java
http_parser.rb-0.6.0.beta.2-java ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/ParseUrl.java
http_parser.rb-0.6.0.beta.2 ext/ruby_http_parser/vendor/http-parser-java/src/test/http_parser/lolevel/ParseUrl.java