mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-03-23 09:20:30 +00:00
Add unicode file test
This commit is contained in:
parent
77daf80e82
commit
2d3ea65f78
3 changed files with 13 additions and 1 deletions
1
tests/checker/data/Мошкова.bin
Normal file
1
tests/checker/data/Мошкова.bin
Normal file
|
|
@ -0,0 +1 @@
|
|||
test of utf-8 charset
|
||||
7
tests/checker/data/Мошкова.bin.result
Normal file
7
tests/checker/data/Мошкова.bin.result
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
url file://%(curdir)s/%(datadir)s/Мошкова.bin
|
||||
cache key file://%(curdir)s/%(datadir)s/%%D0%%9C%%D0%%BE%%D1%%88%%D0%%BA%%D0%%BE%%D0%%B2%%D0%%B0.bin
|
||||
real url file://%(curdir)s/%(datadir)s/%%D0%%9C%%D0%%BE%%D1%%88%%D0%%BA%%D0%%BE%%D0%%B2%%D0%%B0.bin
|
||||
name %(datadir)s/Мошкова.bin
|
||||
warning Base URL is not properly normed. Normed URL is file://%(curdir)s/%(datadir)s/%%D0%%9C%%D0%%BE%%D1%%88%%D0%%BA%%D0%%BE%%D0%%B2%%D0%%B0.bin.
|
||||
valid
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
# -*- coding: iso-8859-1 -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2004-2009 Bastian Kleineidam
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -76,6 +76,10 @@ class TestFile (LinkCheckTest):
|
|||
unzip(dirname+".zip", os.path.dirname(dirname))
|
||||
self.file_test("dir")
|
||||
|
||||
def test_unicode_filename (self):
|
||||
# a unicode filename
|
||||
self.file_test(u"Мошкова.bin")
|
||||
|
||||
def test_good_file (self):
|
||||
url = u"file://%(curdir)s/%(datadir)s/file.txt" % self.get_attrs()
|
||||
nurl = self.norm(url)
|
||||
|
|
|
|||
Loading…
Reference in a new issue