Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
Zip
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Jira
Jira
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
YongYue
Zip
Commits
d3e733d2
Commit
d3e733d2
authored
Jan 16, 2016
by
Roy Marmelstein
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Additional tests
parent
c29f08bc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
0 deletions
+37
-0
ZipTests/ZipTests.swift
ZipTests/ZipTests.swift
+37
-0
No files found.
ZipTests/ZipTests.swift
View file @
d3e733d2
...
...
@@ -29,8 +29,45 @@ class ZipTests: XCTestCase {
catch
{
XCTFail
()
}
}
func
testQuickUnzipNonExistingPath
()
{
do
{
let
filePathURL
=
NSBundle
(
forClass
:
ZipTests
.
self
)
.
resourcePath
let
fileAbsoluteURL
=
NSURL
(
string
:
"
\(
filePathURL
!
)
/bb9.zip"
)
let
destinationURL
=
try
Zip
()
.
quickUnzipFile
(
fileAbsoluteURL
!
)
let
fileManager
=
NSFileManager
.
defaultManager
()
XCTAssertFalse
(
fileManager
.
fileExistsAtPath
(
destinationURL
.
path
!
))
}
catch
{
XCTAssert
(
true
)
}
}
func
testQuickUnzipNonZipPath
()
{
do
{
let
fileAbsoluteURL
=
NSBundle
(
forClass
:
ZipTests
.
self
)
.
URLForResource
(
"3crBXeO"
,
withExtension
:
"gif"
)
!
let
destinationURL
=
try
Zip
()
.
quickUnzipFile
(
fileAbsoluteURL
)
let
fileManager
=
NSFileManager
.
defaultManager
()
XCTAssertFalse
(
fileManager
.
fileExistsAtPath
(
destinationURL
.
path
!
))
}
catch
{
XCTAssert
(
true
)
}
}
func
testQuickUnzipProgress
()
{
do
{
let
fileAbsoluteURL
=
NSBundle
(
forClass
:
ZipTests
.
self
)
.
URLForResource
(
"bb8"
,
withExtension
:
"zip"
)
!
try
Zip
()
.
quickUnzipFile
(
fileAbsoluteURL
,
progress
:
{
(
progress
)
->
()
in
XCTAssert
(
true
)
})
}
catch
{
XCTFail
()
}
}
}
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