File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
CodeEditTests/Features/SourceControl Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 1+ //
2+ // GitClientTests.swift
3+ // CodeEditTests
4+ //
5+ // Created by Khan Winter on 9/11/25.
6+ //
7+
8+ import Testing
9+ @testable import CodeEdit
10+
11+ @Suite
12+ struct GitClientTests {
13+ @Test
14+ func statusParseNullAtEnd( ) throws {
15+ try withTempDir { dirURL in
16+ // swiftlint:disable:next line_length
17+ let string = " 1 .M N... 100644 100644 100644 eaef31cfa2a22418c00d7477da0b7151d122681e eaef31cfa2a22418c00d7477da0b7151d122681e CodeEdit/Features/SourceControl/Client/GitClient+Status.swift \0 1 AM N... 000000 100644 100644 0000000000000000000000000000000000000000 e0f5ce250b32cf6610a284b7a33ac114079f5159 CodeEditTests/Features/SourceControl/GitClientTests.swift \0 "
18+ let client = GitClient ( directoryURL: dirURL, shellClient: . live( ) )
19+ let status = try client. parseStatusString ( string)
20+
21+ #expect( status. changedFiles. count == 2 )
22+ // No null string at the end
23+ #expect( status. changedFiles [ 0 ] . fileURL. lastPathComponent == " GitClient+Status.swift " )
24+ #expect( status. changedFiles [ 1 ] . fileURL. lastPathComponent == " GitClientTests.swift " )
25+ }
26+ }
27+ }
You can’t perform that action at this time.
0 commit comments