Skip to content

Commit 4813714

Browse files
committed
Fixes compilation warnings, but also fixes the running of
esctest on MacOS, Swift Subprocess needs to monitor SIGCHLD and I was overwriting it, so undo that.
1 parent a229be7 commit 4813714

3 files changed

Lines changed: 12 additions & 6 deletions

File tree

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ let targets: [Target] = [
2222
name: "SwiftTerm",
2323
dependencies: [],
2424
path: "Sources/SwiftTerm",
25-
exclude: platformExcludes
25+
exclude: platformExcludes + ["Mac/README.md"]
2626
),
2727
.executableTarget (
2828
name: "SwiftTermFuzz",
@@ -52,7 +52,7 @@ let targets: [Target] = [
5252
.product(name: "Subprocess", package: "swift-subprocess", condition: .when(platforms: [.macOS, .linux]))
5353
],
5454
path: "Sources/SwiftTerm",
55-
exclude: platformExcludes
55+
exclude: platformExcludes + ["Mac/README.md"]
5656
),
5757
.executableTarget (
5858
name: "SwiftTermFuzz",

Tests/SwiftTermTests/ReflowTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ final class ReflowTests {
2626
// if we resize to a small column width, content is pushed back up and out the top
2727
// of the buffer. Ensure that this does not crash
2828
t.resize(cols: 3, rows: 10)
29-
#expect(true)
29+
#expect(Bool(true))
3030
}
3131
}
3232
#endif

Tests/SwiftTermTests/SwiftTermTests.swift

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@ import Testing
55
@testable import SwiftTerm
66

77
final class SwiftTermTests {
8-
static let esctest = "esctest/esctest/esctest.py"
8+
static let esctest: String = {
9+
// Compute path relative to source file to work from any working directory (including Xcode)
10+
let thisFile = URL(fileURLWithPath: #filePath)
11+
let projectRoot = thisFile.deletingLastPathComponent().deletingLastPathComponent().deletingLastPathComponent()
12+
return projectRoot.appendingPathComponent("esctest/esctest/esctest.py").path
13+
}()
914
static let queue: DispatchQueue = {
1015
let queue = DispatchQueue(label: "Runner", qos: .userInteractive, attributes: .concurrent, autoreleaseFrequency: .inherit, target: nil)
11-
// Ignore SIGCHLD
12-
signal(SIGCHLD, SIG_IGN)
1316
return queue
1417
}()
1518
let termConfig = "--expected-terminal xterm --xterm-checksum=334"
@@ -315,6 +318,9 @@ final class SwiftTermTests {
315318
// Use this test to run a single test
316319
@Test func testSingle() {
317320
#expect(runTester("test_ChangeColor_Hash3") == nil)
321+
// #expect(runTester("test_DECRQSS_DECSLRM") == nil)
322+
// #expect(runTester("test_DECSCL_Level4_SupportsDECSLRMDoesntSupportDECNCSM") == nil)
323+
//#expect(runTester("test_DSCSCL_Level3_SupportsDECRQMDoesntSupportDECSLRM") == nil)
318324
}
319325

320326
@Test func testWraparound() {

0 commit comments

Comments
 (0)