Skip to content

Commit a02e8f4

Browse files
committed
Updated test to open plain text editor
With eclipse-platform/eclipse.platform.ui#2881, .txt files are opened by default with more advanced "generic code editor" so changed the file names to make sure they are not known by content types catalog and so still opened with "old default" plain text editor. Fixes #2129
1 parent ac0a503 commit a02e8f4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

org.eclipse.jdt.ui.tests/leaks/org/eclipse/jdt/ui/tests/leaks/JavaLeakTest.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -87,18 +87,18 @@ public class JavaLeakTest extends LeakTestCase {
8787

8888
@Test
8989
public void testTextEditorClose() throws Exception {
90-
IFile file= createTestFile("Test.txt");
90+
IFile file= createTestFile("Test");
9191
internalTestEditorClose(file, TextEditor.class, false);
9292
}
9393

9494
@Test
9595
public void testTextEditorCloseOneOfTwo() throws Exception {
96-
IFile file1= createTestFile("Test1.txt");
96+
IFile file1= createTestFile("Test1");
9797
IEditorPart editor1= EditorUtility.openInEditor(file1);
9898
assertEquals(editor1.getClass(), TextEditor.class);
9999
assertInstanceCount(TextEditor.class, 1);
100100

101-
IFile file2= createTestFile("Test2.txt");
101+
IFile file2= createTestFile("Test2");
102102
IEditorPart editor2= EditorUtility.openInEditor(file2);
103103
assertEquals(editor2.getClass(), TextEditor.class);
104104
assertInstanceCount(TextEditor.class, 2);
@@ -116,7 +116,7 @@ public void testTextEditorCloseOneOfTwo() throws Exception {
116116

117117
@Test
118118
public void testTextEditorCloseAll() throws Exception {
119-
IFile file= createTestFile("Test.txt");
119+
IFile file= createTestFile("Test");
120120
internalTestEditorClose(file, TextEditor.class, true);
121121
}
122122

0 commit comments

Comments
 (0)