Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,19 @@ public void testWholeWordSearchAvailable() {
assertFalse(isConsideredWholeWord.test(""));
}

@Test
public void testWholeWordRemainsAvailableWhenUnavailableRegexIsActivated() {
IFindReplaceLogic findReplaceLogic= setupFindReplaceLogicObject(null);
findReplaceLogic.setFindString("word");
assertFalse(findReplaceLogic.isAvailable(SearchOptions.REGEX)); // null target has no regex support
assertTrue(findReplaceLogic.isAvailable(SearchOptions.WHOLE_WORD));

findReplaceLogic.activate(SearchOptions.REGEX);

// Activating an unavailable option has no effective impact, so whole-word must remain available
assertTrue(findReplaceLogic.isAvailable(SearchOptions.WHOLE_WORD));
}

@Test
public void testReplaceInScopeStaysInScope() {
TextViewer textViewer= setupTextViewer(LINE_STRING + lineSeparator() + LINE_STRING + lineSeparator() + LINE_STRING);
Expand Down
Loading