xgouchet / Elmyr

A utility to make Kotlin/Java tests random yet reproducible
Other
82 stars 2 forks source link

Generate url that matches Patterns.WEB_URL #31

Closed rafal-kobylko closed 5 years ago

rafal-kobylko commented 5 years ago

Hi! Is it possible to generate url which matches Patterns.WEB_URL from Android?

 /**
     *  Regular expression pattern to match most part of RFC 3987
     *  Internationalized URLs, aka IRIs.
     */
    public static final Pattern WEB_URL = Pattern.compile("("
            + "("
            + "(?:" + PROTOCOL + "(?:" + USER_INFO + ")?" + ")?"
            + "(?:" + DOMAIN_NAME_STR + ")"
            + "(?:" + PORT_NUMBER + ")?"
            + ")"
            + "(" + PATH_AND_QUERY + ")?"
            + WORD_BOUNDARY
            + ")");

Forger.aUrl(scheme = "http") does not follow that standard.

xgouchet commented 5 years ago

Sure I'll take a look at it !