KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > htmlparser > tests > utilTests > NonEnglishTest


1 // HTMLParser Library $Name: v1_5_20050313 $ - A java-based parser for HTML
2
// http://sourceforge.org/projects/htmlparser
3
// Copyright (C) 2004 Somik Raha
4
//
5
// Revision Control Information
6
//
7
// $Source: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/tests/utilTests/NonEnglishTest.java,v $
8
// $Author: derrickoswald $
9
// $Date: 2005/03/12 12:52:20 $
10
// $Revision: 1.1 $
11
//
12
// This library is free software; you can redistribute it and/or
13
// modify it under the terms of the GNU Lesser General Public
14
// License as published by the Free Software Foundation; either
15
// version 2.1 of the License, or (at your option) any later version.
16
//
17
// This library is distributed in the hope that it will be useful,
18
// but WITHOUT ANY WARRANTY; without even the implied warranty of
19
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
// Lesser General Public License for more details.
21
//
22
// You should have received a copy of the GNU Lesser General Public
23
// License along with this library; if not, write to the Free Software
24
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25
//
26

27 package org.htmlparser.tests.utilTests;
28
29 import org.htmlparser.beans.StringBean;
30 import org.htmlparser.tests.ParserTestCase;
31 import org.htmlparser.util.ParserException;
32
33 /**
34  * Test case for bug #1161137 Non English Character web page.
35  * Submitted by Michael (tilosdcal@users.sourceforge.net)
36  */

37 public class NonEnglishTest extends ParserTestCase
38 {
39     static
40     {
41         System.setProperty ("org.htmlparser.tests.utilTests.NonEnglishTest", "NonEnglishTest");
42     }
43
44     public NonEnglishTest (String JavaDoc name)
45     {
46         super(name);
47     }
48
49     public void testNonEnglishCharacters() throws ParserException
50     {
51         StringBean sb;
52         
53         sb = new StringBean ();
54         sb.setURL ("http://www.kobe-np.co.jp/");
55         sb.getStrings ();
56         sb.setURL ("http://book.asahi.com/"); // this used to throw an exception
57
sb.getStrings ();
58     }
59 }
60
Popular Tags