Skip to content

Commit c8ab807

Browse files
committed
Fixed tests
1 parent 0a95561 commit c8ab807

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Tests/CodeEditSourceEditorTests/FindPanelTests.swift

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,9 @@ struct FindPanelTests {
180180

181181
// Test matchesWord
182182
viewModel.findMethod = .matchesWord
183+
viewModel.findText = "test1"
183184
viewModel.find()
184-
#expect(viewModel.findMatches.count == 3)
185+
#expect(viewModel.findMatches.count == 1)
185186

186187
// Test startsWith
187188
viewModel.findMethod = .startsWith
@@ -191,7 +192,7 @@ struct FindPanelTests {
191192

192193
// Test endsWith
193194
viewModel.findMethod = .endsWith
194-
viewModel.findText = "test3"
195+
viewModel.findText = "3"
195196
viewModel.find()
196197
#expect(viewModel.findMatches.count == 1)
197198

@@ -203,7 +204,7 @@ struct FindPanelTests {
203204
}
204205

205206
@Test func findMethodPickerOptionsWithComplexText() async throws {
206-
target.textView.string = "test1 test2 test3\nprefix_test suffix_test\nword_test_word"
207+
target.textView.string = "test1 test2 test3\nprefix_test test_suffix\nword_test_word"
207208

208209
// Test contains with partial matches
209210
viewModel.findMethod = .contains
@@ -213,8 +214,9 @@ struct FindPanelTests {
213214

214215
// Test matchesWord with word boundaries
215216
viewModel.findMethod = .matchesWord
217+
viewModel.findText = "test1"
216218
viewModel.find()
217-
#expect(viewModel.findMatches.count == 3)
219+
#expect(viewModel.findMatches.count == 1)
218220

219221
// Test startsWith with prefixes
220222
viewModel.findMethod = .startsWith

0 commit comments

Comments
 (0)