Skip to content

Commit

Permalink
Merge pull request #71 from bmironer/fix-issue-66
Browse files Browse the repository at this point in the history
Fixes issue 66
  • Loading branch information
Jeehut authored Sep 26, 2017
2 parents e9d821c + ace1802 commit d5c7666
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
18 changes: 9 additions & 9 deletions Sources/Code/Commander.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,15 @@ class Commander {
task.standardError = errpipe

task.launch()


var errors: [String] = []
let errdata = errpipe.fileHandleForReading.readDataToEndOfFile()

if var string = String(data: errdata, encoding: .utf8) {
string = string.trimmingCharacters(in: .newlines)
errors = string.components(separatedBy: "\n")
}

var outputs: [String] = []
let outdata = outpipe.fileHandleForReading.readDataToEndOfFile()

Expand All @@ -41,14 +49,6 @@ class Commander {
outputs = string.components(separatedBy: "\n")
}

var errors: [String] = []
let errdata = errpipe.fileHandleForReading.readDataToEndOfFile()

if var string = String(data: errdata, encoding: .utf8) {
string = string.trimmingCharacters(in: .newlines)
errors = string.components(separatedBy: "\n")
}

task.waitUntilExit()
let status = task.terminationStatus

Expand Down
6 changes: 3 additions & 3 deletions Tests/Code/StringsFilesSearchTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class StringsFilesSearchTests: XCTestCase {
let results = StringsFilesSearch.shared.findAllIBFiles(within: basePath, withLocale: "Base")

XCTAssertEqual(results.count, expectedIBFilePaths.count)
XCTAssertEqual(results, expectedIBFilePaths)
XCTAssertEqual(results.sorted(), expectedIBFilePaths.sorted())
}

func testFindAllStringsFiles() {
Expand All @@ -33,7 +33,7 @@ class StringsFilesSearchTests: XCTestCase {
let results = StringsFilesSearch.shared.findAllStringsFiles(within: basePath, withLocale: "de")

XCTAssertEqual(results.count, expectedStringsFilePaths.count)
XCTAssertEqual(results, expectedStringsFilePaths)
XCTAssertEqual(results.sorted(), expectedStringsFilePaths.sorted())
}

func testiOSFindAllLocalesForStringsFile() {
Expand All @@ -43,7 +43,7 @@ class StringsFilesSearchTests: XCTestCase {
let results = StringsFilesSearch.shared.findAllLocalesForStringsFile(sourceFilePath: baseStoryboardPath)

XCTAssertEqual(results.count, expectedStringsPaths.count)
XCTAssertEqual(results, expectedStringsPaths)
XCTAssertEqual(results.sorted(), expectedStringsPaths.sorted())
}


Expand Down

0 comments on commit d5c7666

Please sign in to comment.