Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 207567 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/mylyn/tasks/tests/web/Html2TextReaderTest.java (+33 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2004, 2007 Mylyn project committers and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *******************************************************************************/
8
9
package org.eclipse.mylyn.tasks.tests.web;
10
11
import java.io.IOException;
12
import java.io.Reader;
13
import java.io.StringReader;
14
15
import junit.framework.TestCase;
16
import org.eclipse.mylyn.internal.jira.ui.html.HTML2TextReader;
17
public class Html2TextReaderTest extends TestCase {
18
19
	public void testCpuLoop() {
20
		String text = "Spurious <?xml version=\"1.0\" encoding=\"UTF-8\"?> in generated <head> section";
21
		Reader stringReader = new StringReader(text);
22
23
		HTML2TextReader html2TextReader = new HTML2TextReader(stringReader, null);
24
		try {
25
			char[] chars = new char[text.length()];
26
			int len = html2TextReader.read(chars, 0, text.length());
27
			assertTrue(true);
28
		} catch (IOException e) {
29
		}
30
		assertTrue(false);
31
32
	}
33
}

Return to bug 207567