mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-09 15:14:45 +00:00
Adjust example.com/org tests. This seems to change every now and then.
This commit is contained in:
parent
023da7c993
commit
b363945052
13 changed files with 22 additions and 70 deletions
|
|
@ -7,7 +7,6 @@ valid
|
|||
|
||||
url http://example.com/
|
||||
cache key http://example.com/
|
||||
real url http://www.iana.org/domains/example/
|
||||
real url http://example.com/
|
||||
name Testlink
|
||||
info Redirected to `http://www.iana.org/domains/example/'.
|
||||
valid
|
||||
|
|
|
|||
|
|
@ -12,7 +12,5 @@ valid
|
|||
|
||||
url http://www.example.com
|
||||
cache key http://www.example.com
|
||||
real url http://www.iana.org/domains/example
|
||||
info Redirected to `http://www.iana.org/domains/example/'.
|
||||
info Redirected to `http://www.iana.org/domains/example'.
|
||||
real url http://www.example.com
|
||||
valid
|
||||
|
|
|
|||
|
|
@ -7,8 +7,7 @@ valid
|
|||
|
||||
url http://www.example.org/
|
||||
cache key http://www.example.org/
|
||||
real url http://www.iana.org/domains/example
|
||||
real url http://www.example.com/
|
||||
name Example.org
|
||||
info Redirected to `http://www.iana.org/domains/example/'.
|
||||
info Redirected to `http://www.iana.org/domains/example'.
|
||||
info Redirected to `http://www.example.com/'.
|
||||
valid
|
||||
|
|
|
|||
|
|
@ -6,9 +6,7 @@ valid
|
|||
|
||||
url HtTP://WwW.ExaMple.cOm/
|
||||
cache key http://www.example.com/
|
||||
real url http://www.iana.org/domains/example
|
||||
real url http://www.example.com/
|
||||
name l1
|
||||
info Redirected to `http://www.iana.org/domains/example/'.
|
||||
info Redirected to `http://www.iana.org/domains/example'.
|
||||
valid
|
||||
|
||||
|
|
|
|||
|
|
@ -6,10 +6,8 @@ valid
|
|||
|
||||
url http://example.com/
|
||||
cache key http://example.com/
|
||||
real url http://www.iana.org/domains/example
|
||||
real url http://example.com/
|
||||
name unquoted
|
||||
info Redirected to `http://www.iana.org/domains/example/'.
|
||||
info Redirected to `http://www.iana.org/domains/example'.
|
||||
valid
|
||||
|
||||
url /stalter&sohn
|
||||
|
|
@ -20,8 +18,6 @@ error
|
|||
|
||||
url http://www.example.com/
|
||||
cache key http://www.example.com/
|
||||
real url http://www.iana.org/domains/example
|
||||
real url http://www.example.com/
|
||||
name no beginning quote example
|
||||
info Redirected to `http://www.iana.org/domains/example/'.
|
||||
info Redirected to `http://www.iana.org/domains/example'.
|
||||
valid
|
||||
|
|
|
|||
|
|
@ -6,10 +6,8 @@ valid
|
|||
|
||||
url http://www.example.com/1
|
||||
cache key http://www.example.com/1
|
||||
real url http://www.iana.org/domains/example
|
||||
real url http://www.example.com/1
|
||||
name ok example
|
||||
info Redirected to `http://www.iana.org/domains/example/'.
|
||||
info Redirected to `http://www.iana.org/domains/example'.
|
||||
valid
|
||||
|
||||
url http:/www.example.com/2
|
||||
|
|
@ -26,10 +24,8 @@ error
|
|||
|
||||
url //www.example.com/4
|
||||
cache key http://www.example.com/4
|
||||
real url http://www.iana.org/domains/example
|
||||
real url http://www.example.com/4
|
||||
name no scheme example
|
||||
info Redirected to `http://www.iana.org/domains/example/'.
|
||||
info Redirected to `http://www.iana.org/domains/example'.
|
||||
valid
|
||||
|
||||
url http://
|
||||
|
|
|
|||
|
|
@ -7,9 +7,7 @@ valid
|
|||
|
||||
url http://www.example.com/
|
||||
cache key http://www.example.com/
|
||||
real url http://www.iana.org/domains/example
|
||||
info Redirected to `http://www.iana.org/domains/example/'.
|
||||
info Redirected to `http://www.iana.org/domains/example'.
|
||||
real url http://www.example.com/
|
||||
valid
|
||||
|
||||
url favicon.ico
|
||||
|
|
|
|||
|
|
@ -7,16 +7,12 @@ valid
|
|||
|
||||
url http://www.example.com/
|
||||
cache key http://www.example.com/
|
||||
real url http://www.iana.org/domains/example
|
||||
real url http://www.example.com/
|
||||
name Imadoofus
|
||||
info Redirected to `http://www.iana.org/domains/example/'.
|
||||
info Redirected to `http://www.iana.org/domains/example'.
|
||||
valid
|
||||
|
||||
url http://www.example.net/
|
||||
cache key http://www.example.net/
|
||||
real url http://www.iana.org/domains/example
|
||||
real url http://www.example.net/
|
||||
name Imanotherdoofus
|
||||
info Redirected to `http://www.iana.org/domains/example/'.
|
||||
info Redirected to `http://www.iana.org/domains/example'.
|
||||
valid
|
||||
|
|
|
|||
|
|
@ -9,16 +9,12 @@ valid
|
|||
|
||||
url http://www.example.com/
|
||||
cache key http://www.example.com/
|
||||
real url http://www.iana.org/domains/example
|
||||
real url http://www.example.com/
|
||||
name Imadoofus
|
||||
info Redirected to `http://www.iana.org/domains/example/'.
|
||||
info Redirected to `http://www.iana.org/domains/example'.
|
||||
valid
|
||||
|
||||
url http://www.example.net/
|
||||
cache key http://www.example.net/
|
||||
real url http://www.iana.org/domains/example
|
||||
real url http://www.example.net/
|
||||
name Imanotherdoofus
|
||||
info Redirected to `http://www.iana.org/domains/example/'.
|
||||
info Redirected to `http://www.iana.org/domains/example'.
|
||||
valid
|
||||
|
|
|
|||
|
|
@ -6,9 +6,7 @@ valid
|
|||
|
||||
url redirect_newhost.html
|
||||
cache key http://localhost:%(port)d/%(datadir)s/redirect_newhost.html
|
||||
real url http://www.iana.org/domains/example
|
||||
real url http://www.example.com/
|
||||
name redirect to new host
|
||||
info Redirected to `http://www.example.com/'.
|
||||
info Redirected to `http://www.iana.org/domains/example/'.
|
||||
info Redirected to `http://www.iana.org/domains/example'.
|
||||
valid
|
||||
|
|
|
|||
|
|
@ -39,9 +39,7 @@ class TestHttpMisc (HttpServerTest):
|
|||
u"valid",
|
||||
u"url http://www.example.org/",
|
||||
u"cache key http://www.example.org/",
|
||||
u"real url http://www.iana.org/domains/example",
|
||||
u"info Redirected to `http://www.iana.org/domains/example/'.",
|
||||
u"info Redirected to `http://www.iana.org/domains/example'.",
|
||||
u"real url http://www.example.org/",
|
||||
u"valid",
|
||||
]
|
||||
self.direct(url, resultlines, recursionlevel=1)
|
||||
|
|
|
|||
|
|
@ -28,16 +28,12 @@ class TestURLLength(LinkCheckTest):
|
|||
def test_url_warn(self):
|
||||
url = u"http://www.example.org/%s" % (u"a" * 256)
|
||||
attrs = self.get_attrs(url=url)
|
||||
attrs['nurl'] = u"http://www.iana.org/domains/example/"
|
||||
attrs['rurl'] = u"http://www.iana.org/domains/example"
|
||||
resultlines = [
|
||||
u"url %(url)s" % attrs,
|
||||
u"cache key %(url)s" % attrs,
|
||||
u"real url %(rurl)s" % attrs,
|
||||
u"info Redirected to `%(nurl)s'." % attrs,
|
||||
u"info Redirected to `%(rurl)s'." % attrs,
|
||||
u"real url %(url)s" % attrs,
|
||||
u"warning URL length 279 is longer than 255.",
|
||||
u"valid",
|
||||
u"error",
|
||||
]
|
||||
self.direct(url, resultlines)
|
||||
|
||||
|
|
|
|||
|
|
@ -29,30 +29,22 @@ class TestWhitespace (LinkCheckTest):
|
|||
# Leading whitespace
|
||||
url = u" http://www.example.org/"
|
||||
attrs = self.get_attrs(url=url)
|
||||
attrs['nurl'] = "http://www.iana.org/domains/example/"
|
||||
attrs['rurl'] = "http://www.iana.org/domains/example"
|
||||
attrs['surl'] = url.strip()
|
||||
resultlines = [
|
||||
u"url %(surl)s" % attrs,
|
||||
u"cache key %(surl)s" % attrs,
|
||||
u"real url %(rurl)s" % attrs,
|
||||
u"info Redirected to `%(nurl)s'." % attrs,
|
||||
u"info Redirected to `%(rurl)s'." % attrs,
|
||||
u"real url %(surl)s" % attrs,
|
||||
u"warning Leading or trailing whitespace in URL `%(url)s'." % attrs,
|
||||
u"valid",
|
||||
]
|
||||
self.direct(url, resultlines)
|
||||
url = u"\nhttp://www.example.org/"
|
||||
attrs = self.get_attrs(url=url)
|
||||
attrs['nurl'] = "http://www.iana.org/domains/example/"
|
||||
attrs['rurl'] = "http://www.iana.org/domains/example"
|
||||
attrs['surl'] = url.strip()
|
||||
resultlines = [
|
||||
u"url %(surl)s" % attrs,
|
||||
u"cache key %(surl)s" % attrs,
|
||||
u"real url %(rurl)s" % attrs,
|
||||
u"info Redirected to `%(nurl)s'." % attrs,
|
||||
u"info Redirected to `%(rurl)s'." % attrs,
|
||||
u"real url %(surl)s" % attrs,
|
||||
u"warning Leading or trailing whitespace in URL `%(url)s'." % attrs,
|
||||
u"valid",
|
||||
]
|
||||
|
|
@ -61,27 +53,19 @@ class TestWhitespace (LinkCheckTest):
|
|||
def test_trailing_whitespace (self):
|
||||
# Trailing whitespace
|
||||
url = u"http://www.example.org/ "
|
||||
nurl = "http://www.iana.org/domains/example/"
|
||||
rurl = "http://www.iana.org/domains/example"
|
||||
resultlines = [
|
||||
u"url %s" % url.strip(),
|
||||
u"cache key %s" % url.strip(),
|
||||
u"real url %s" % rurl,
|
||||
u"info Redirected to `%s'." % nurl,
|
||||
u"info Redirected to `%s'." % rurl,
|
||||
u"real url %s" % url.strip(),
|
||||
u"warning Leading or trailing whitespace in URL `%s'." % url,
|
||||
u"valid",
|
||||
]
|
||||
self.direct(url, resultlines)
|
||||
url = u"http://www.example.org/\n"
|
||||
nurl = "http://www.iana.org/domains/example/"
|
||||
rurl = "http://www.iana.org/domains/example"
|
||||
resultlines = [
|
||||
u"url %s" % url.strip(),
|
||||
u"cache key %s" % url.strip(),
|
||||
u"real url %s" % rurl,
|
||||
u"info Redirected to `%s'." % nurl,
|
||||
u"info Redirected to `%s'." % rurl,
|
||||
u"real url %s" % url.strip(),
|
||||
u"warning Leading or trailing whitespace in URL `%s'." % url,
|
||||
u"valid",
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in a new issue