void () { String text = "a\n<caret>b\n#%%\nc"; // ^^^^^^^ <- guarded myFixture.configureByText("x.txt", text); createGuard(3, 8).setGreedyToLeft(true); try { myFixture.performEditorAction(IdeActions.ACTION_EDITOR_DELETE_LINE); } catch (RuntimeException e) { assertEquals("Unable to perform an action since it changes read-only fragments of the current document", e.getMessage()); myFixture.checkResult(text); return; } fail("must be read only at " + 3); }