File tree Expand file tree Collapse file tree 3 files changed +24
-5
lines changed
CodeEditTests/Features/Tasks
CodeEditUITests/Features/UtilityArea/TerminalUtility
CodeEdit/Features/LSP/Registry/PackageSourceParser Expand file tree Collapse file tree 3 files changed +24
-5
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ enum PackageSourceParser {
4040 false
4141 }
4242
43- var source = PackageSource (
43+ let source = PackageSource (
4444 sourceId: sourceId,
4545 type: isSourceBuild ? . sourceBuild : . github,
4646 pkgName: packageName,
Original file line number Diff line number Diff line change @@ -26,9 +26,28 @@ class TaskManagerTests {
2626 #expect( taskManager. availableTasks == mockWorkspaceSettings. tasks)
2727 }
2828
29- @Test ( arguments: [ SettingsData . TerminalShell. zsh, SettingsData . TerminalShell. bash] )
30- func executeSelectedTask( _ shell: SettingsData . TerminalShell ) async throws {
31- Settings . shared. preferences. terminal. shell = shell
29+ @Test
30+ func executeTaskInZsh( ) async throws {
31+ Settings . shared. preferences. terminal. shell = . zsh
32+
33+ let task = CETask ( name: " Test Task " , command: " echo 'Hello World' " )
34+ mockWorkspaceSettings. tasks. append ( task)
35+ taskManager. selectedTaskID = task. id
36+ taskManager. executeActiveTask ( )
37+
38+ await waitForExpectation ( timeout: . seconds( 10 ) ) {
39+ self . taskManager. activeTasks [ task. id] ? . status == . finished
40+ } onTimeout: {
41+ Issue . record ( " Status never changed to finished. " )
42+ }
43+
44+ let outputString = try #require( taskManager. activeTasks [ task. id] ? . output? . getBufferAsString ( ) )
45+ #expect( outputString. contains ( " Hello World " ) )
46+ }
47+
48+ @Test
49+ func executeTaskInBash( ) async throws {
50+ Settings . shared. preferences. terminal. shell = . bash
3251
3352 let task = CETask ( name: " Test Task " , command: " echo 'Hello World' " )
3453 mockWorkspaceSettings. tasks. append ( task)
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ final class TerminalUtilityUITests: XCTestCase {
2828 }
2929
3030 func testTerminalsInputData( ) throws {
31- var terminal = utilityArea. textViews [ " Terminal Emulator " ]
31+ let terminal = utilityArea. textViews [ " Terminal Emulator " ]
3232 XCTAssertTrue ( terminal. exists)
3333 terminal. click ( )
3434 terminal. typeText ( " echo hello world " )
You can’t perform that action at this time.
0 commit comments