Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
1024jp committed Nov 10, 2016
2 parents 303986d + a94b319 commit e2aa274
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 5 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ DerivedData
*.ipa
*.xcuserstate


# SPM
#
.build
Packages/


# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
Expand Down
2 changes: 1 addition & 1 deletion Gzip.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
2A321F071D4A635F002B0245 /* Gzip.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Gzip.framework; sourceTree = BUILT_PRODUCTS_DIR; };
2A321F101D4A6398002B0245 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS10.0.sdk/usr/lib/libz.tbd; sourceTree = DEVELOPER_DIR; };
2A58A7571B00F414005FBBC2 /* Tests macOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Tests macOS.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
2A58A75C1B00F414005FBBC2 /* GzipTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GzipTests.swift; sourceTree = "<group>"; };
2A58A75C1B00F414005FBBC2 /* GzipTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = GzipTests.swift; path = GzipTests/GzipTests.swift; sourceTree = "<group>"; };
2A58A7611B00F42C005FBBC2 /* Data+Gzip.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Data+Gzip.swift"; sourceTree = "<group>"; };
2A58A77D1B00FBEF005FBBC2 /* Tests iOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Tests iOS.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
2A8219C61D65AFB300D65063 /* test.txt.gz */ = {isa = PBXFileReference; lastKnownFileType = archive.gzip; path = test.txt.gz; sourceTree = "<group>"; };
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PackageDescription

let package = Package(
name: "GzipSwift",
name: "Gzip",
dependencies: [.Package(url: "https://github.com/1024jp/zlib.git", versions: Version(0,0,0)..<Version(1,0,0))]
)
5 changes: 2 additions & 3 deletions Tests/GzipTests.swift → Tests/GzipTests/GzipTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

import Foundation
import XCTest
import Gzip

class NSData_GZIPTests: XCTestCase {
class GzipTests: XCTestCase {

func testGZip() {

Expand Down Expand Up @@ -97,7 +96,7 @@ class NSData_GZIPTests: XCTestCase {
func testFileDecompression() {

let bundle = Bundle(for: type(of: self))
let url = bundle.url(forResource: "test.txt", withExtension: "gz")!
guard let url = bundle.url(forResource: "test.txt", withExtension: "gz") else { return }
let data = try! Data(contentsOf: url)
let uncompressed = try! data.gunzipped()

Expand Down
36 changes: 36 additions & 0 deletions Tests/LinuxMain.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
//
// LinuxMain.swift
// Gzip
//
// Created by 1024jp on 2016-11-10.

/*
The MIT License (MIT)

© 2016 1024jp

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/

import XCTest
@testable import GzipTests

XCTMain([
testCase(GzipTests.allTests),
])

0 comments on commit e2aa274

Please sign in to comment.