Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
package_control_channel
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Gaurav Kukreja
package_control_channel
Commits
7736fec3
Commit
7736fec3
authored
Mar 09, 2014
by
FichteFoll
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2922 from wbond/test_details
Add tests for the details urls
parents
271824da
ca8f534f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
11 deletions
+30
-11
f.json
repository/f.json
+2
-2
o.json
repository/o.json
+3
-3
p.json
repository/p.json
+2
-2
test.py
tests/test.py
+23
-4
No files found.
repository/f.json
View file @
7736fec3
...
...
@@ -73,7 +73,7 @@
"releases"
:
[
{
"sublime_text"
:
"*"
,
"details"
:
"https://github.com/alessandrofac93/FalconSublimeTools/
releases/tags
"
"details"
:
"https://github.com/alessandrofac93/FalconSublimeTools/
tree/master
"
}
]
},
...
...
@@ -146,7 +146,7 @@
"releases"
:
[
{
"sublime_text"
:
"*"
,
"details"
:
"https://github.com/jaabell/fei-syntax-n-snippets/master"
"details"
:
"https://github.com/jaabell/fei-syntax-n-snippets/
tree/
master"
}
]
},
...
...
repository/o.json
View file @
7736fec3
...
...
@@ -99,12 +99,12 @@
},
{
"name"
:
"Ohdeung-eun"
,
"details"
:
"http://github.com/luavis/Ohdeung-eun"
,
"details"
:
"http
s
://github.com/luavis/Ohdeung-eun"
,
"labels"
:
[
"Lorem"
,
"lorem"
,
"hangul"
,
"
\\
uc624
\\
ub4f1
\\
uc740"
],
"releases"
:
[
{
"sublime_text"
:
"*"
,
"details"
:
"http://github.com/luavis/Ohdeung-eun/tree/master"
"details"
:
"http
s
://github.com/luavis/Ohdeung-eun/tree/master"
}
]
},
...
...
@@ -308,7 +308,7 @@
"*"
],
"sublime_text"
:
"*"
,
"details"
:
"https://bitbucket.org/bteryek/openinbrowser
/
#tags"
"details"
:
"https://bitbucket.org/bteryek/openinbrowser#tags"
}
]
},
...
...
repository/p.json
View file @
7736fec3
...
...
@@ -594,7 +594,7 @@
"*"
],
"sublime_text"
:
"*"
,
"details"
:
"https://bitbucket.org/bteryek/phpcodegen
/
#tags"
"details"
:
"https://bitbucket.org/bteryek/phpcodegen#tags"
}
]
},
...
...
@@ -807,7 +807,7 @@
},
{
"name"
:
"plist"
,
"details"
:
"https://bitbucket.org/fschwehn/sublime_plist
/overview
"
,
"details"
:
"https://bitbucket.org/fschwehn/sublime_plist"
,
"labels"
:
[
"language syntax"
],
"releases"
:
[
{
...
...
tests/test.py
View file @
7736fec3
...
...
@@ -133,6 +133,16 @@ class TestContainer(object):
'labels'
:
list
}
d_reg
=
r'''^ (https:// github\.com/ [^/]+/ [^/]+ (/tree/ .+ (?<!/)
|/tags
|/)?
|https:// bitbucket\.org/ [^/]+/ [^/]+ (/src/ .+ (?<!/)
|\#tags
|/)?
) $'''
# Strip multilines for better debug info on failures
details_regex
=
re
.
compile
(
' '
.
join
(
d_reg
.
split
()),
re
.
X
)
def
_test_repository_keys
(
self
,
include
,
data
):
self
.
assertTrue
(
2
<=
len
(
data
)
<=
3
,
"Unexpected number of keys"
)
self
.
assertIn
(
'schema_version'
,
data
)
...
...
@@ -182,10 +192,14 @@ class TestContainer(object):
self
.
assertIn
(
k
,
self
.
package_key_types_map
)
self
.
assertIsInstance
(
v
,
self
.
package_key_types_map
[
k
],
k
)
if
k
in
(
'details'
,
'homepage'
,
'readme'
,
'issues'
,
'donate'
,
'buy'
):
if
k
in
(
'homepage'
,
'readme'
,
'issues'
,
'donate'
,
'buy'
):
self
.
assertRegex
(
v
,
'^https?://'
)
if
k
==
'details'
:
self
.
assertRegex
(
v
,
self
.
details_regex
,
'The details url is badly formatted or '
'invalid'
)
# Test for invalid characters (on file systems)
if
k
==
'name'
:
# Invalid on Windows (and sometimes problematic on UNIX)
...
...
@@ -233,8 +247,13 @@ class TestContainer(object):
if
k
==
'date'
:
self
.
assertRegex
(
v
,
r"^\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d$"
)
if
k
in
(
'details'
,
'url'
):
self
.
assertRegex
(
v
,
'^https?://'
)
if
k
==
'url'
:
self
.
assertRegex
(
v
,
r'^https?://'
)
if
k
==
'details'
:
self
.
assertRegex
(
v
,
self
.
details_regex
,
'The details url is badly formatted or '
'invalid'
)
if
k
==
'sublime_text'
:
self
.
assertRegex
(
v
,
'^(
\
*|<=?
\
d{4}|>=?
\
d{4})$'
,
...
...
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