Skip to content

Commit

Permalink
Fix Linux walk recursive test
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Nov 20, 2015
1 parent 3958d0c commit 062e152
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Tests/sys/PathTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,16 @@ class WalkTests: XCTestCase {
}

func testRecursive() {
var expected = ["/usr/share/locale/UTF-8/LC_CTYPE", "/usr/share/man/man1/yes.1"]
let root = Path.join(__FILE__, "../../../Sources").normpath
var expected = [
Path.join(root, "dep"),
Path.join(root, "sys")
]

for x in walk("/usr/share") {
for x in walk(root) {
if let i = expected.indexOf(x) {
expected.removeAtIndex(i)
}
XCTAssertGreaterThanOrEqual(x.characters.split("/").count, 2)
}

XCTAssertEqual(expected.count, 0)
Expand Down

0 comments on commit 062e152

Please sign in to comment.