File tree Expand file tree Collapse file tree 1 file changed +3
-16
lines changed
Tests/TestingTests/Support Expand file tree Collapse file tree 1 file changed +3
-16
lines changed Original file line number Diff line number Diff line change @@ -203,24 +203,11 @@ struct FileHandleTests {
203203#endif
204204
205205 @Test ( " Root directory path is correct " )
206- func rootDirectoryPathIsCorrect( ) async {
206+ func rootDirectoryPathIsCorrect( ) throws {
207207#if os(Windows)
208- #if !SWT_NO_EXIT_TESTS
209- await #expect( processExitsWith: . success) {
210- #expect( Environment . setVariable ( nil , named: " SYSTEMDRIVE " ) )
211- #expect( rootDirectoryPath == #"C:\"# )
212- }
213-
214- await #expect( processExitsWith: . success) {
215- #expect( Environment . setVariable ( " Q: " , named: " SYSTEMDRIVE " ) )
216- #expect( rootDirectoryPath == #"Q:\"# )
208+ if let systemDrive = Environment . variable ( named: " SYSTEMDRIVE " ) {
209+ #expect( rootDirectoryPath. starts ( with: systemDrive) )
217210 }
218-
219- await #expect( processExitsWith: . success) {
220- #expect( Environment . setVariable ( #"Q:\abc123"# , named: " SYSTEMDRIVE " ) )
221- #expect( rootDirectoryPath == #"Q:\abc123\"# )
222- }
223- #endif
224211#else
225212 #expect( rootDirectoryPath == " / " )
226213#endif
You can’t perform that action at this time.
0 commit comments