rfc2396 1.1.0

A library for validating strings as RFC2396-compliant URIs
Documentation
use anyhow::Context;

test_cases! {
    uri::absolute_uri: {
        case_g_h: "g:h",
        case_http_a: "http://a/",
        case_http_a_b: "http://a/b/",
        case_http_a_b_c: "http://a/b/c/",
        case_http_a_b_c_d_p_q: "http://a/b/c/d;p?q",
        case_http_a_b_c_d_p_y: "http://a/b/c/d;p?y",
        case_http_a_b_c_g: "http://a/b/c/g",
        case_http_a_b_c_g_slash: "http://a/b/c/g/",
        case_http_a_b_c_g_x: "http://a/b/c/g;x",
        case_http_a_b_c_g_y: "http://a/b/c/g?y",
        case_http_a_b_c_x: "http://a/b/c/;x",
        case_http_a_b_g: "http://a/b/g",
        case_http_a_g: "http://a/g",
        case_http_dev_plex: "http://dev.plexapp.com/docs/agents/models.html",
        case_http_devgrok: "http://www.devgrok.com/2015/03/developing-plex-media-server-plugins.html",
        case_http_example: "http://example.com",
        case_http_example_dict_c: "http://example.com/dictionary/c/cat",
        case_http_example_dict_d: "http://example.com/dictionary/d/dog",
        case_http_example_foo: "http://www.example.com/foo",
        case_http_example_foo_number: "http://www.example.com/foo?number=100",
        case_http_example_foo_query: "http://www.example.com/foo?query=mycelium&number=100",
        case_http_example_fred: "http://example.com/~fred/",
        case_http_example_home: "http://example.com/home/index",
        case_http_example_mark: "http://example.com/~mark/",
        case_http_example_search_en: "http://example.com/search?q=cat&lang=en",
        case_http_example_search_fr: "http://example.com/search?q=chien&lang=fr",
        case_http_example_wiki: "http://example.org/wiki/Main_Page",
        case_http_g: "http://g",
        case_http_localhost: "http://127.0.0.1",
        case_http_permissions: "http://permissions-calculator.org/",
        case_http_unit: "http://www.unit-conversion.info/texttools/random-string-generator/",
        case_https_alt: "https://alternativeto.net/",
        case_https_animelab: "https://www.animelab.com/racks/watchlist",
        case_https_app_plex: "https://app.plex.tv",
        case_https_archive: "https://web.archive.org/web/20150113085312/",
        case_https_auspost: "https://auspost.com.au/auth/login?caller=DELIVERIES_DELIVERY_OPTION&product=MYPOST_CONSUMER&channel=WEB",
        case_https_bsaber: "https://bsaber.com/curator-recommended/page/34/",
        case_https_cabs: "https://book.13cabs.com.au/",
        case_https_coles: "https://shop.coles.com.au/a/rockhampton-nth/home",
        case_https_computeralliance: "https://www.computeralliance.com.au/",
        case_https_crates: "https://crates.io/",
        case_https_crunchyroll: "https://www.crunchyroll.com/home/queue",
        case_https_dev_moz: "https://developer.mozilla.org/en-US/docs/Web/HTTP/Status",
        case_https_drive: "https://drive.google.com/drive/my-drive",
        case_https_epoch: "https://www.epochconverter.com/",
        case_https_euler: "https://projecteuler.net/",
        case_https_file: "https://www.fileformat.info/info/unicode/char/search.htm",
        case_https_font: "https://fontawesome.com/icons?d=gallery",
        case_https_forum_plex_doc: "https://forums.plex.tv/t/plugin-development-documentation/107751",
        case_https_forum_plex_walkthrough: "https://forums.plex.tv/t/plex-plugin-development-walkthrough/9909",
        case_https_gdnative: "https://docs.rs/gdnative/0.9.1/gdnative/index.html",
        case_https_github_cc: "https://github.com/SquidDev-CC/CC-Tweaked/tree/fff8353451451be5ae31e0f63d8e529b127fd186/src/main/resources/data/computercraft/lua",
        case_https_github_cpython: "https://github.com/dgrunwald/rust-cpython",
        case_https_github_example: "https://github.com/Example-User?tab=repositories",
        case_https_github_lucky: "https://github.com/luckytoilet/projecteuler-solutions",
        case_https_github_plex: "https://github.com/squaresmile/Plex-Plug-Ins",
        case_https_gitlab: "https://gitlab.com/",
        case_https_godot: "https://docs.godotengine.org/en/stable/getting_started/step_by_step/signals.html",
        case_https_guid: "https://www.guidgenerator.com/",
        case_https_ietf: "https://www.ietf.org/rfc/rfc2396.txt",
        case_https_ipaddress: "https://www.ipaddressguide.com/cidr",
        case_https_ipcheck: "https://www.ipchecktool.com/tool/macfinder",
        case_https_mwave: "https://www.mwave.com.au/",
        case_https_office: "https://www.office.com/launch/excel?ui=en-US&rs=AU&auth=1",
        case_https_pascall: "https://www.pascallandau.com/blog/setup-phpstorm-with-xdebug-on-docker/",
        case_https_pccasegear: "https://www.pccasegear.com/account",
        case_https_ple: "https://www.ple.com.au/MyPLE.aspx",
        case_https_raildex: "https://toarumajutsunoindex.fandom.com/wiki/Anime_Timeline",
        case_https_regex: "https://regex101.com/",
        case_https_roman: "https://roman-numerals.info/",
        case_https_scorptec: "https://www.scorptec.com.au/",
        case_https_survey: "https://www.soscisurvey.de/tools/view-chars.php",
        case_https_umart: "https://www.umart.com.au/",
        case_https_url: "https://www.urlencoder.org/",
        case_https_wiki: "https://en.wikipedia.org/wiki/Uniform_Resource_Identifier",
        case_https_woolies: "https://www.woolworths.com.au/",
        case_https_yt: "https://www.youtube.com/feed/subscriptions",
        case_isbn: "urn:isbn:0-486-27557-4",
        case_ldap: "ldap://120.0.8.7/c=GB?objectClass?one",
        case_mail: "mailto:John.Doe@example.com",
        case_news: "news:comp.infosystems.www.servers.unix",
        case_oasis: "urn:oasis:names:specification:docbook:dtd:xml:4.1.2",
        case_tel: "tel:+1-816-555-1212",
        case_telnet: "telnet://192.0.2.16:80/"
    }
}