void () { configureFromFileText(getTestName(false) + ".txt", "abcdefghijklmnopqrstuvwxyz"); EditorTestUtil.addFoldRegion(getEditor(), 0, 10, ".", true); EditorTestUtil.addFoldRegion(getEditor(), 0, 5, ".", false); EditorTestUtil.addFoldRegion(getEditor(), 1, 2, ".", true); EditorTestUtil.addFoldRegion(getEditor(), 7, 10, ".", false); EditorTestUtil.addFoldRegion(getEditor(), 10, 11, ".", true); StringBuilder b = new StringBuilder(); Iterator<FoldRegion> it = FoldingUtil.createFoldTreeIterator(getEditor()); while (it.hasNext()) { FoldRegion region = it.next(); if (b.length() > 0) { b.append('|'); } b.append(region.getStartOffset()).append(',').append(region.getEndOffset()); } assertEquals("0,10|0,5|1,2|7,10|10,11", b.toString()); }