Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
d72402ef
Kaydet (Commit)
d72402ef
authored
Eki 27, 2010
tarafından
Antoine Pitrou
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Recode modules from latin-1 to utf-8
üst
6b03ee60
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
12 deletions
+9
-12
shlex.py
Lib/shlex.py
+2
-3
test_sax.py
Lib/test/test_sax.py
+3
-3
test_shlex.py
Lib/test/test_shlex.py
+2
-3
test_unicode.py
Lib/test/test_unicode.py
+2
-3
No files found.
Lib/shlex.py
Dosyayı görüntüle @
d72402ef
# -*- coding: iso-8859-1 -*-
"""A lexical analyzer class for simple shell-like syntaxes."""
"""A lexical analyzer class for simple shell-like syntaxes."""
# Module and documentation by Eric S. Raymond, 21 Dec 1998
# Module and documentation by Eric S. Raymond, 21 Dec 1998
...
@@ -35,8 +34,8 @@ class shlex:
...
@@ -35,8 +34,8 @@ class shlex:
self
.
wordchars
=
(
'abcdfeghijklmnopqrstuvwxyz'
self
.
wordchars
=
(
'abcdfeghijklmnopqrstuvwxyz'
'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_'
)
'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_'
)
if
self
.
posix
:
if
self
.
posix
:
self
.
wordchars
+=
(
''
self
.
wordchars
+=
(
'
ßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ
'
''
)
'
ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ
'
)
self
.
whitespace
=
'
\t\r\n
'
self
.
whitespace
=
'
\t\r\n
'
self
.
whitespace_split
=
False
self
.
whitespace_split
=
False
self
.
quotes
=
'
\'
"'
self
.
quotes
=
'
\'
"'
...
...
Lib/test/test_sax.py
Dosyayı görüntüle @
d72402ef
# regression test for SAX 2.0
-*- coding: iso-8859-1 -*-
# regression test for SAX 2.0
# $Id$
# $Id$
from
xml.sax
import
make_parser
,
ContentHandler
,
\
from
xml.sax
import
make_parser
,
ContentHandler
,
\
...
@@ -114,7 +114,7 @@ class SaxutilsTest(unittest.TestCase):
...
@@ -114,7 +114,7 @@ class SaxutilsTest(unittest.TestCase):
"<Donald Duck & Co>"
)
"<Donald Duck & Co>"
)
def
test_escape_extra
(
self
):
def
test_escape_extra
(
self
):
self
.
assertEquals
(
escape
(
"Hei p
deg"
,
{
"
"
:
"å"
}),
self
.
assertEquals
(
escape
(
"Hei p
å deg"
,
{
"å
"
:
"å"
}),
"Hei på deg"
)
"Hei på deg"
)
# ===== unescape
# ===== unescape
...
@@ -126,7 +126,7 @@ class SaxutilsTest(unittest.TestCase):
...
@@ -126,7 +126,7 @@ class SaxutilsTest(unittest.TestCase):
"<Donald Duck & Co>"
)
"<Donald Duck & Co>"
)
def
test_unescape_extra
(
self
):
def
test_unescape_extra
(
self
):
self
.
assertEquals
(
unescape
(
"Hei p
deg"
,
{
"
"
:
"å"
}),
self
.
assertEquals
(
unescape
(
"Hei p
å deg"
,
{
"å
"
:
"å"
}),
"Hei på deg"
)
"Hei på deg"
)
def
test_unescape_amp_extra
(
self
):
def
test_unescape_amp_extra
(
self
):
...
...
Lib/test/test_shlex.py
Dosyayı görüntüle @
d72402ef
# -*- coding: iso-8859-1 -*-
import
unittest
import
unittest
import
os
,
sys
,
io
import
os
,
sys
,
io
import
shlex
import
shlex
...
@@ -68,7 +67,7 @@ foo\ x\x\""|foo|\|x|\|x|\|""|
...
@@ -68,7 +67,7 @@ foo\ x\x\""|foo|\|x|\|x|\|""|
foo\ bar|foo|\|bar|
foo\ bar|foo|\|bar|
foo#bar\nbaz|foobaz|
foo#bar\nbaz|foobaz|
:-) ;-)|:|-|)|;|-|)|
:-) ;-)|:|-|)|;|-|)|
|||||
|
áéíóú|á|é|í|ó|ú
|
"""
"""
posix_data
=
r"""x|x|
posix_data
=
r"""x|x|
...
@@ -132,7 +131,7 @@ foo\ x\x\"|foo xx"|
...
@@ -132,7 +131,7 @@ foo\ x\x\"|foo xx"|
foo\ bar|foo bar|
foo\ bar|foo bar|
foo#bar\nbaz|foo|baz|
foo#bar\nbaz|foo|baz|
:-) ;-)|:-)|;-)|
:-) ;-)|:-)|;-)|
|
|
áéíóú|áéíóú
|
"""
"""
class
ShlexTest
(
unittest
.
TestCase
):
class
ShlexTest
(
unittest
.
TestCase
):
...
...
Lib/test/test_unicode.py
Dosyayı görüntüle @
d72402ef
# -*- coding: iso-8859-1 -*-
""" Test script for the Unicode implementation.
""" Test script for the Unicode implementation.
Written by Marc-Andre Lemburg (mal@lemburg.com).
Written by Marc-Andre Lemburg (mal@lemburg.com).
...
@@ -403,11 +402,11 @@ class UnicodeTest(string_tests.CommonTest,
...
@@ -403,11 +402,11 @@ class UnicodeTest(string_tests.CommonTest,
self
.
assertTrue
(
"b0"
.
isidentifier
())
self
.
assertTrue
(
"b0"
.
isidentifier
())
self
.
assertTrue
(
"bc"
.
isidentifier
())
self
.
assertTrue
(
"bc"
.
isidentifier
())
self
.
assertTrue
(
"b_"
.
isidentifier
())
self
.
assertTrue
(
"b_"
.
isidentifier
())
self
.
assertTrue
(
""
.
isidentifier
())
self
.
assertTrue
(
"
µ
"
.
isidentifier
())
self
.
assertFalse
(
" "
.
isidentifier
())
self
.
assertFalse
(
" "
.
isidentifier
())
self
.
assertFalse
(
"["
.
isidentifier
())
self
.
assertFalse
(
"["
.
isidentifier
())
self
.
assertFalse
(
""
.
isidentifier
())
self
.
assertFalse
(
"
©
"
.
isidentifier
())
self
.
assertFalse
(
"0"
.
isidentifier
())
self
.
assertFalse
(
"0"
.
isidentifier
())
def
test_isprintable
(
self
):
def
test_isprintable
(
self
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment