void () { myFixture.configureByText("a.txt", "<caret>brown fox"); EditorTestUtil.addFoldRegion(myFixture.getEditor(), 4, 7, "...", true); myFixture.performEditorAction(IdeActions.ACTION_EDITOR_NEXT_WORD); myFixture.checkResult("brow<caret>n fox"); myFixture.performEditorAction(IdeActions.ACTION_EDITOR_NEXT_WORD); myFixture.checkResult("brown f<caret>ox"); myFixture.performEditorAction(IdeActions.ACTION_EDITOR_NEXT_WORD); myFixture.checkResult("brown fox<caret>"); myFixture.performEditorAction(IdeActions.ACTION_EDITOR_PREVIOUS_WORD); myFixture.checkResult("brown f<caret>ox"); myFixture.performEditorAction(IdeActions.ACTION_EDITOR_PREVIOUS_WORD); myFixture.checkResult("brow<caret>n fox"); myFixture.performEditorAction(IdeActions.ACTION_EDITOR_PREVIOUS_WORD); myFixture.checkResult("<caret>brown fox"); FoldRegion[] foldRegions = myFixture.getEditor().getFoldingModel().getAllFoldRegions(); assertEquals(1, foldRegions.length); assertFalse(foldRegions[0].isExpanded()); }