mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-27 17:44:42 +00:00
update test output
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@392 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
08a00652e0
commit
9693e71b2c
18 changed files with 22 additions and 133 deletions
|
|
@ -6,30 +6,22 @@ valid
|
|||
url file:///home/calvin/projects/linkchecker/test/html/file.asc
|
||||
valid
|
||||
url http.html
|
||||
name relative url
|
||||
valid
|
||||
url http.html#isnix
|
||||
name bad anchor
|
||||
warning anchor #isnix not found
|
||||
valid
|
||||
url http.html#iswas
|
||||
name good anchor
|
||||
valid
|
||||
url file:///etc/group
|
||||
name good file
|
||||
valid
|
||||
url file://etc/group
|
||||
name bad file
|
||||
error
|
||||
url file:/etc/group
|
||||
cached
|
||||
name good file
|
||||
valid
|
||||
url file:etc/group
|
||||
name bad file
|
||||
error
|
||||
url file:/etc/
|
||||
name good dir
|
||||
valid
|
||||
url file:///etc/group
|
||||
cached
|
||||
|
|
|
|||
|
|
@ -2,57 +2,42 @@ test_http
|
|||
url file:///home/calvin/projects/linkchecker/test/html/http.html
|
||||
valid
|
||||
url http://www.garantiertnixgutt.bla
|
||||
name bad url
|
||||
warning Missing '/' at end of URL
|
||||
error
|
||||
url http://www.heise.de
|
||||
name ok
|
||||
warning Missing '/' at end of URL
|
||||
valid
|
||||
url http:/www.heise.de
|
||||
name one slash
|
||||
error
|
||||
url http:www.heise.de
|
||||
name no slash
|
||||
error
|
||||
url http://
|
||||
name no url
|
||||
warning Missing '/' at end of URL
|
||||
error
|
||||
url http:/
|
||||
name no url, one slash
|
||||
error
|
||||
url http:
|
||||
cached
|
||||
name no url, no slash
|
||||
warning Missing '/' at end of URL
|
||||
error
|
||||
url http://www.blubb.de/stalter&sohn
|
||||
name unquoted ampersand
|
||||
error
|
||||
url http://slashdot.org/
|
||||
name unquoted
|
||||
valid
|
||||
url http://fsinfo.cs.uni-sb.de/~calvin/#isnix
|
||||
name invalid anchor
|
||||
warning anchor #isnix not found
|
||||
valid
|
||||
url HtTP://WWW.hEIsE.DE
|
||||
cached
|
||||
name should be cached
|
||||
warning Missing '/' at end of URL
|
||||
valid
|
||||
url HTTP://WWW.HEISE.DE
|
||||
cached
|
||||
name should be cached
|
||||
warning Missing '/' at end of URL
|
||||
valid
|
||||
url http://www.heise.de/?quoted=ü
|
||||
name html entities
|
||||
valid
|
||||
url illegalquote1
|
||||
name no beginning quote
|
||||
error
|
||||
url illegalquote2
|
||||
name no ending quote
|
||||
error
|
||||
|
|
|
|||
|
|
@ -2,5 +2,4 @@ test_https
|
|||
url file:///home/calvin/projects/linkchecker/test/html/https.html
|
||||
valid
|
||||
url https://sourceforge.net/
|
||||
name https
|
||||
valid
|
||||
|
|
|
|||
|
|
@ -2,43 +2,31 @@ test_mail
|
|||
url file:///home/calvin/projects/linkchecker/test/html/mail.html
|
||||
valid
|
||||
url mailto:calvin@LocalHost?subject=Hallo&to=michi
|
||||
name 1
|
||||
warning No MX mail host for LocalHost found
|
||||
valid
|
||||
url mailto:Dude <calvin@studcs.uni-sb.de> , Killer <calvin@cs.uni-sb.de>?subject=bla
|
||||
name 2
|
||||
valid
|
||||
url mailto:Bastian Kleineidam <calvin@studcs.uni-sb.de>?bcc=jsmith%40company.com
|
||||
name 3
|
||||
warning No MX mail host for company.com found
|
||||
valid
|
||||
url mailto:Bastian Kleineidam <calvin@studcs.uni-sb.de>
|
||||
name 4
|
||||
valid
|
||||
url mailto:
|
||||
name 6
|
||||
warning No adresses found
|
||||
valid
|
||||
url mailto:o'hara@cs.uni-sb.de
|
||||
name 5
|
||||
valid
|
||||
url mailto:?to=calvin@studcs.uni-sb.de&subject=blubb&cc=calvin_cc@studcs.uni-sb.de&CC=calvin_CC@studcs.uni-sb.de
|
||||
name ...
|
||||
valid
|
||||
url mailto:news-admins@freshmeat.net?subject=Re:%20[fm%20#11093]%20(news-admins)%20Submission%20report%20-%20Pretty%20CoLoRs
|
||||
name ...
|
||||
valid
|
||||
url mailto:jan@jan-dittberner.de?subject=test
|
||||
name ...
|
||||
valid
|
||||
url mailto:a@d?subject=äöü
|
||||
name 5
|
||||
warning No MX mail host for d found
|
||||
valid
|
||||
url mailto:calvin@cs.uni-sb.de?subject=Halli hallo
|
||||
name _
|
||||
valid
|
||||
url mailto:Bastian Kleineidam <calvin@host1?foo=bar>
|
||||
name 3
|
||||
warning No MX mail host for host1 found
|
||||
valid
|
||||
|
|
|
|||
|
|
@ -2,10 +2,8 @@ test_misc
|
|||
url file:///home/calvin/projects/linkchecker/test/html/misc.html
|
||||
valid
|
||||
url hutzli:nixgutt
|
||||
name bad scheme
|
||||
error
|
||||
url javascript:loadthis()
|
||||
name javascript url
|
||||
warning Javascript url ignored
|
||||
valid
|
||||
url telnet:localhost
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
#!/usr/bin/python
|
||||
"""
|
||||
Copyright (C) 2000 Bastian Kleineidam
|
||||
|
||||
|
|
@ -17,12 +18,15 @@
|
|||
"""
|
||||
|
||||
# profiling test
|
||||
import sys,re,profile,pstats,linkcheck
|
||||
import sys, re, profile, os
|
||||
sys.path.append(os.getcwd())
|
||||
import linkcheck
|
||||
|
||||
#linkcheck.Config.DebugFlag = 1
|
||||
|
||||
def runit(config, name):
|
||||
def runit (config, name):
|
||||
url='http://www.heise.de/'
|
||||
config['recursionlevel'] = 2
|
||||
config['recursionlevel'] = 1
|
||||
config['anchors'] = 1
|
||||
config['internlinks'].append(re.compile(r"^https?://www\.heise\.de"))
|
||||
# avoid checking of local files (security!)
|
||||
|
|
|
|||
|
|
@ -30,7 +30,8 @@ If no test names are given, all tests are run.
|
|||
|
||||
import sys, getopt, os
|
||||
|
||||
import test_support
|
||||
sys.path.append(os.getcwd())
|
||||
from linkcheck import test_support
|
||||
|
||||
def main(tests=None, testdir=None, verbose=0, quiet=0, generate=0,
|
||||
exclude=0, randomize=0):
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import os,sys
|
||||
sys.path.append(os.getcwd())
|
||||
import os, sys
|
||||
import linkcheck
|
||||
config = linkcheck.Config.Configuration()
|
||||
config['recursionlevel'] = 1
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import os,sys
|
||||
sys.path.append(os.getcwd())
|
||||
import os, sys
|
||||
import linkcheck
|
||||
config = linkcheck.Config.Configuration()
|
||||
config['recursionlevel'] = 1
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import os,sys
|
||||
sys.path.append(os.getcwd())
|
||||
import os, sys
|
||||
import linkcheck
|
||||
config = linkcheck.Config.Configuration()
|
||||
config['recursionlevel'] = 1
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import os,sys
|
||||
sys.path.append(os.getcwd())
|
||||
import os, sys
|
||||
import linkcheck
|
||||
config = linkcheck.Config.Configuration()
|
||||
config['recursionlevel'] = 1
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import os,sys
|
||||
sys.path.append(os.getcwd())
|
||||
import os, sys
|
||||
import linkcheck
|
||||
config = linkcheck.Config.Configuration()
|
||||
config['recursionlevel'] = 1
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import os,sys
|
||||
sys.path.append(os.getcwd())
|
||||
import os, sys
|
||||
import linkcheck
|
||||
config = linkcheck.Config.Configuration()
|
||||
config['recursionlevel'] = 1
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import os,sys
|
||||
sys.path.append(os.getcwd())
|
||||
import os, sys
|
||||
import linkcheck
|
||||
config = linkcheck.Config.Configuration()
|
||||
config['recursionlevel'] = 1
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import os,sys
|
||||
sys.path.append(os.getcwd())
|
||||
import os, sys
|
||||
import linkcheck
|
||||
config = linkcheck.Config.Configuration()
|
||||
config['recursionlevel'] = 1
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import os,sys
|
||||
sys.path.append(os.getcwd())
|
||||
import os, sys
|
||||
import linkcheck
|
||||
config = linkcheck.Config.Configuration()
|
||||
config['recursionlevel'] = 1
|
||||
|
|
|
|||
|
|
@ -1,72 +0,0 @@
|
|||
"""Supporting definitions for the Python regression test."""
|
||||
|
||||
|
||||
class Error(Exception):
|
||||
"""Base class for regression test exceptions."""
|
||||
|
||||
class TestFailed(Error):
|
||||
"""Test failed."""
|
||||
|
||||
class TestSkipped(Error):
|
||||
"""Test skipped.
|
||||
|
||||
This can be raised to indicate that a test was deliberatly
|
||||
skipped, but not because a feature wasn't available. For
|
||||
example, if some resource can't be used, such as the network
|
||||
appears to be unavailable, this should be raised instead of
|
||||
TestFailed.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
verbose = 1 # Flag set to 0 by regrtest.py
|
||||
|
||||
def unload(name):
|
||||
import sys
|
||||
try:
|
||||
del sys.modules[name]
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
def forget(modname):
|
||||
unload(modname)
|
||||
import sys, os
|
||||
for dirname in sys.path:
|
||||
try:
|
||||
os.unlink(os.path.join(dirname, modname + '.pyc'))
|
||||
except os.error:
|
||||
pass
|
||||
|
||||
FUZZ = 1e-6
|
||||
|
||||
def fcmp(x, y): # fuzzy comparison function
|
||||
if type(x) == type(0.0) or type(y) == type(0.0):
|
||||
try:
|
||||
x, y = coerce(x, y)
|
||||
fuzz = (abs(x) + abs(y)) * FUZZ
|
||||
if abs(x-y) <= fuzz:
|
||||
return 0
|
||||
except:
|
||||
pass
|
||||
elif type(x) == type(y) and type(x) in (type(()), type([])):
|
||||
for i in range(min(len(x), len(y))):
|
||||
outcome = fcmp(x[i], y[i])
|
||||
if outcome <> 0:
|
||||
return outcome
|
||||
return cmp(len(x), len(y))
|
||||
return cmp(x, y)
|
||||
|
||||
TESTFN = '@test' # Filename used for testing
|
||||
from os import unlink
|
||||
|
||||
def findfile(file, here=__file__):
|
||||
import os
|
||||
if os.path.isabs(file):
|
||||
return file
|
||||
import sys
|
||||
path = sys.path
|
||||
path = [os.path.dirname(here)] + path
|
||||
for dn in path:
|
||||
fn = os.path.join(dn, file)
|
||||
if os.path.exists(fn): return fn
|
||||
return file
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
#!/usr/bin/python
|
||||
"""
|
||||
Copyright (C) 2000 Bastian Kleineidam
|
||||
|
||||
|
|
@ -18,4 +19,6 @@
|
|||
import pstats,glob
|
||||
|
||||
for file in glob.glob('*.prof'):
|
||||
pstats.Stats(file).strip_dirs().sort_stats("cumulative").print_stats(20)
|
||||
stats = pstats.Stats(file)
|
||||
#stats.strip_dirs().sort_stats("cumulative").print_stats(50)
|
||||
stats.print_callees()
|
||||
|
|
|
|||
Loading…
Reference in a new issue