
tests:
  urls:
    - description: "Valid url: protocol + domain"
      text: "http://example.com"
      expected: true

    - description: "Valid url: ssl + domain + path + query"
      text: "https://example.com/path/to/resource?search=foo&lang=en"
      expected: true

    - description: "Valid url: protocol + domain + path + fragment"
      text: "http://twitter.com/#!/twitter"
      expected: true

    - description: "Valid url: cased protocol and domain"
      text: "HTTPS://www.ExaMPLE.COM/index.html"
      expected: true

    - description: "Valid url: port and userinfo"
      text: "http://user:PASSW0RD@example.com:8080/login.php"
      expected: true

    - description: "Valid url: matrix path parameters"
      text: "http://sports.yahoo.com/nfl/news;_ylt=Aom0;ylu=XyZ?slug=ap-superbowlnotebook"
      expected: true

    - description: "Valid url: ipv4"
      text: "http://192.168.0.1/index.html?src=asdf"
      expected: true

    - description: "Valid url: ipv6"
      text: "http://[3ffe:1900:4545:3:200:f8ff:fe21:67cf]:80/index.html"
      expected: true

    - description: "Valid url: underscore in subdomain"
      text: "http://test_underscore.twitter.com"
      expected: true

    - description: "Valid url: sub delims and question marks"
      text: "http://example.com?foo=$bar.;baz?BAZ&c=d-#top/?stories+"
      expected: true

    - description: "Valid unicode url: unicode domain"
      text: "http://☃.net/"
      expected: true

    - description: "Invalid url: invalid scheme"
      text: "ftp://www.example.com/"
      expected: false

    - description: "Invalid url: invalid userinfo characters"
      text: "https://user:pass[word]@www.example.com/"
      expected: false

    - description: "Invalid url: underscore in domain"
      text: "http://domain-dash_2314352345_dfasd.foo-cow_4352.com"
      expected: false

    - description: "Invalid url: domain beginning dash"
      text: "http://www.-domain4352.com/"
      expected: false

    - description: "Invalid url: domain trailing dash"
      text: "http://www.domain4352-.com/"
      expected: false

    - description: "Invalid url: unicode domain trailing dash"
      text: "http://☃-.net/"
      expected: false

    - description: "Invalid url: improperly encoded unicode domain"
      text: "http://%e2%98%83.net/"
      expected: false

    - description: "Invalid url: invalid IP"
      text: "http://256.1.2.3/"
      expected: false

    - description: "Invalid url: invalid char in path"
      text: "http://en.wikipedia.org/wiki/\"#Punctuation"
      expected: false

    - description: "Invalid url: trailing space"
      text: "http://example.com/#anchor "
      expected: false

  urls_without_protocol:
    - description: "Valid url without protocol: domain + gTLD"
      text: "example.com"
      expected: true

    - description: "Valid url without protocol: subdomain + domain + gTLD"
      text: "www.example.com"
      expected: true

    - description: "Valid url without protocol: domain + ccTLD"
      text: "t.co"
      expected: true

    - description: "Valid url without protocol: subdomain + domain + ccTLD"
      text: "foo.co.jp"
      expected: true

    - description: "Valid url without protocol: domain + path + query"
      text: "example.com/path/to/resource?search=foo&lang=en"
      expected: true
