Skip to content

Commit d7c6ca1

Browse files
committed
Check for output in c executable test
1 parent 4a549d7 commit d7c6ca1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Tests/Functional/TestClangModules.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ class TestClangModulesTestCase: XCTestCase {
6767
func testCExecutable() {
6868
fixture(name: "ValidLayouts/SingleModule/CExecutable") { prefix in
6969
XCTAssertBuilds(prefix)
70-
XCTAssertFileExists(prefix, ".build/debug/CExecutable")
70+
let exec = ".build/debug/CExecutable"
71+
XCTAssertFileExists(prefix, exec)
72+
let output = try popen([Path.join(prefix, exec)])
73+
XCTAssertEqual(output, "hello 5")
7174
}
7275
}
7376
}

0 commit comments

Comments
 (0)