File tree Expand file tree Collapse file tree 2 files changed +4
-12
lines changed Expand file tree Collapse file tree 2 files changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -43,11 +43,11 @@ final class PseudoTerminal {
43
43
return String ( cString: buf)
44
44
}
45
45
46
- func close ( ) {
46
+ func closeSlave ( ) {
47
47
_ = libc. close ( slave)
48
48
}
49
49
50
- deinit {
50
+ func closeMaster ( ) {
51
51
_ = libc. close ( master)
52
52
}
53
53
}
@@ -79,9 +79,10 @@ final class ProgressBarTests: XCTestCase {
79
79
}
80
80
thread. start ( )
81
81
runProgressBar ( bar)
82
- pty. close ( )
82
+ pty. closeSlave ( )
83
83
// Make sure to read the complete output before checking it.
84
84
thread. join ( )
85
+ pty. closeMaster ( )
85
86
XCTAssertTrue ( output. chuzzle ( ) ? . hasPrefix ( " \u{1B} [36m \u{1B} [1mTestHeader \u{1B} [0m " ) ?? false )
86
87
}
87
88
Original file line number Diff line number Diff line change @@ -16,27 +16,18 @@ import Utility
16
16
class ShellTests : XCTestCase {
17
17
18
18
func testPopen( ) {
19
- // FIXME: Disabled due to https://bugs.swift.org/browse/SR-2703
20
- #if false
21
19
XCTAssertEqual ( try ! popen ( [ " echo " , " foo " ] ) , " foo \n " )
22
- #endif
23
20
}
24
21
25
22
func testPopenWithBufferLargerThanThatAllocated( ) {
26
- // FIXME: Disabled due to https://bugs.swift.org/browse/SR-2703
27
- #if false
28
23
let path = AbsolutePath ( #file) . parentDirectory. parentDirectory. appending ( components: " GetTests " , " VersionGraphTests.swift " )
29
24
XCTAssertGreaterThan ( try ! popen ( [ " cat " , path. asString] ) . characters. count, 4096 )
30
- #endif
31
25
}
32
26
33
27
func testPopenWithBinaryOutput( ) {
34
- // FIXME: Disabled due to https://bugs.swift.org/browse/SR-2703
35
- #if false
36
28
if ( try ? popen ( [ " cat " , " /bin/cat " ] ) ) != nil {
37
29
XCTFail ( " popen succeeded but should have faileds " )
38
30
}
39
- #endif
40
31
}
41
32
42
33
static var allTests = [
You can’t perform that action at this time.
0 commit comments