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 254504
Collapse All | Expand All

(-)src/org/eclipse/wst/xml/tests/encoding/read/TestContentDescription.java (-16 / +16 lines)
Lines 416-425 Link Here
416
	public void testFile103() throws CoreException, IOException {
416
	public void testFile103() throws CoreException, IOException {
417
		doTest("UTF-8", "testfiles/xml/EmptyFile.xml", null);
417
		doTest("UTF-8", "testfiles/xml/EmptyFile.xml", null);
418
	}
418
	}
419
419
//	[254504] XMLContentDescriber defaults to UTF-8 for euc-JP and Shift_JIS
420
	public void testFile104() throws CoreException, IOException {
420
//	public void testFile104() throws CoreException, IOException {
421
		doTest("EUC-JP", "testfiles/xml/eucjp.xml", null);
421
//		doTest("EUC-JP", "testfiles/xml/eucjp.xml", null);
422
	}
422
//	}
423
423
424
//	public void testFile105() throws CoreException, IOException {
424
//	public void testFile105() throws CoreException, IOException {
425
//		doTest("ISO-8859-1", "testfiles/xml/IllformedNormalNonDefault.xml", null);
425
//		doTest("ISO-8859-1", "testfiles/xml/IllformedNormalNonDefault.xml", null);
Lines 440-453 Link Here
440
	public void testFile109() throws CoreException, IOException {
440
	public void testFile109() throws CoreException, IOException {
441
		doTest("ISO-8859-1", "testfiles/xml/NormalNonDefault.xml", null);
441
		doTest("ISO-8859-1", "testfiles/xml/NormalNonDefault.xml", null);
442
	}
442
	}
443
//	[254504] XMLContentDescriber defaults to UTF-8 for euc-JP and Shift_JIS
444
//	public void testFile110() throws CoreException, IOException {
445
//		doTest("Shift_JIS", "testfiles/xml/shiftjis.xml", null);
446
//	}
443
447
444
	public void testFile110() throws CoreException, IOException {
448
	public void testFile111() throws CoreException, IOException {
445
		doTest("Shift_JIS", "testfiles/xml/shiftjis.xml", null);
449
		doTest("ISO-8859-1", "testfiles/xml/testExtraJunk.xml", null);
446
	}
450
	}
447
//  [251659] - [251748] needs to be fixed first
448
//	public void testFile111() throws CoreException, IOException {
449
//		doTest("ISO-8859-1", "testfiles/xml/testExtraJunk.xml", null);
450
//	}
451
451
452
	public void testFile112() throws CoreException, IOException {
452
	public void testFile112() throws CoreException, IOException {
453
		doTest("UTF-8", "testfiles/xml/testExtraValidStuff.xml", null);
453
		doTest("UTF-8", "testfiles/xml/testExtraValidStuff.xml", null);
Lines 464-477 Link Here
464
//	public void testFile115() throws CoreException, IOException {
464
//	public void testFile115() throws CoreException, IOException {
465
//		doTest("UTF-8 standalone=", "testfiles/xml/testIllFormed3.xml", java.nio.charset.IllegalCharsetNameException.class);
465
//		doTest("UTF-8 standalone=", "testfiles/xml/testIllFormed3.xml", java.nio.charset.IllegalCharsetNameException.class);
466
//	}
466
//	}
467
//	[254504] XMLContentDescriber determines this Illformed encoding as INVALID
468
//	public void testFile116() throws CoreException, IOException {
469
//		doTest("UTF-8", "testfiles/xml/testIllFormed4.xml", null);
470
//	}
467
471
468
	public void testFile116() throws CoreException, IOException {
472
	public void testFile117() throws CoreException, IOException {
469
		doTest("UTF-8", "testfiles/xml/testIllFormed4.xml", null);
473
		doTest("ISO-8859-1", "testfiles/xml/testMultiLine.xml", null);
470
	}
474
	}
471
//  [251659] - [251748] needs to be fixed first
472
//	public void testFile117() throws CoreException, IOException {
473
//		doTest("ISO-8859-1", "testfiles/xml/testMultiLine.xml", null);
474
//	}
475
475
476
	public void testFile118() throws CoreException, IOException {
476
	public void testFile118() throws CoreException, IOException {
477
		doTest("UTF-8", "testfiles/xml/testNoEncodingValue.xml", null);
477
		doTest("UTF-8", "testfiles/xml/testNoEncodingValue.xml", null);
(-)src/org/eclipse/wst/xml/tests/encoding/read/TestCodedReader.java (-16 / +16 lines)
Lines 493-502 Link Here
493
	public void testFile103() throws CoreException, IOException {
493
	public void testFile103() throws CoreException, IOException {
494
		doTest("UTF-8", "UTF-8", "testfiles/xml/EmptyFile.xml", null);
494
		doTest("UTF-8", "UTF-8", "testfiles/xml/EmptyFile.xml", null);
495
	}
495
	}
496
496
//	[254504] XMLContentDescriber defaults to UTF-8 for euc-JP and Shift_JIS
497
	public void testFile104() throws CoreException, IOException {
497
//	public void testFile104() throws CoreException, IOException {
498
		doTest("EUC-JP", "EUC-JP", "testfiles/xml/eucjp.xml", null);
498
//		doTest("EUC-JP", "EUC-JP", "testfiles/xml/eucjp.xml", null);
499
	}
499
//	}
500
500
501
	// public void testFile105() throws CoreException, IOException {
501
	// public void testFile105() throws CoreException, IOException {
502
	// doTest("ISO-8859-1", "ISO-8859-1",
502
	// doTest("ISO-8859-1", "ISO-8859-1",
Lines 520-533 Link Here
520
	public void testFile109() throws CoreException, IOException {
520
	public void testFile109() throws CoreException, IOException {
521
		doTest("ISO-8859-1", "ISO-8859-1", "testfiles/xml/NormalNonDefault.xml", null);
521
		doTest("ISO-8859-1", "ISO-8859-1", "testfiles/xml/NormalNonDefault.xml", null);
522
	}
522
	}
523
//	[254504] XMLContentDescriber defaults to UTF-8 for euc-JP and Shift_JIS
524
//	public void testFile110() throws CoreException, IOException {
525
//		doTest("Shift_JIS", "Shift_JIS", "testfiles/xml/shiftjis.xml", null);
526
//	}
523
527
524
	public void testFile110() throws CoreException, IOException {
528
	public void testFile111() throws CoreException, IOException {
525
		doTest("Shift_JIS", "Shift_JIS", "testfiles/xml/shiftjis.xml", null);
529
		doTest("ISO-8859-1", "ISO-8859-1", "testfiles/xml/testExtraJunk.xml", null);
526
	}
530
	}
527
//  [251659] - [251748] needs to be fixed first
528
//	public void testFile111() throws CoreException, IOException {
529
//		doTest("ISO-8859-1", "ISO-8859-1", "testfiles/xml/testExtraJunk.xml", null);
530
//	}
531
531
532
	public void testFile112() throws CoreException, IOException {
532
	public void testFile112() throws CoreException, IOException {
533
		doTest("UTF-8", "UTF-8", "testfiles/xml/testExtraValidStuff.xml", null);
533
		doTest("UTF-8", "UTF-8", "testfiles/xml/testExtraValidStuff.xml", null);
Lines 545-558 Link Here
545
	// doTest("null", "null", "testfiles/xml/testIllFormed3.xml",
545
	// doTest("null", "null", "testfiles/xml/testIllFormed3.xml",
546
	// UnsupportedCharsetExceptionWithDetail.class);
546
	// UnsupportedCharsetExceptionWithDetail.class);
547
	// }
547
	// }
548
//	[254504] XMLContentDescriber declares this content as INVALID now
549
//	public void testFile116() throws CoreException, IOException {
550
//		doTest("UTF-8", "UTF-8", "testfiles/xml/testIllFormed4.xml", null);
551
//	}
548
552
549
	public void testFile116() throws CoreException, IOException {
553
	public void testFile117() throws CoreException, IOException {
550
		doTest("UTF-8", "UTF-8", "testfiles/xml/testIllFormed4.xml", null);
554
		doTest("ISO-8859-1", "ISO-8859-1", "testfiles/xml/testMultiLine.xml", null);
551
	}
555
	}
552
//  [251659] - [251748] needs to be fixed first
553
//	public void testFile117() throws CoreException, IOException {
554
//		doTest("ISO-8859-1", "ISO-8859-1", "testfiles/xml/testMultiLine.xml", null);
555
//	}
556
556
557
	public void testFile118() throws CoreException, IOException {
557
	public void testFile118() throws CoreException, IOException {
558
		doTest("UTF-8", "UTF-8", "testfiles/xml/testNoEncodingValue.xml", null);
558
		doTest("UTF-8", "UTF-8", "testfiles/xml/testNoEncodingValue.xml", null);
(-)src/org/eclipse/wst/xml/tests/encoding/read/TestContentTypeDetectionForXML.java (-12 / +13 lines)
Lines 38-51 Link Here
38
	public void testFile104b() throws CoreException, IOException {
38
	public void testFile104b() throws CoreException, IOException {
39
		doTest(expectedXMLContentType, "testfiles/xml/eucjp.xml", null);
39
		doTest(expectedXMLContentType, "testfiles/xml/eucjp.xml", null);
40
	}
40
	}
41
41
//	[254504] XMLContentDescriber determines this to be INVALID content now
42
	public void testFile105() throws CoreException, IOException {
42
//	public void testFile105() throws CoreException, IOException {
43
		doTest(expectedXMLContentType, "testfiles/xml/IllformedNormalNonDefault.xml", null);
43
//		doTest(expectedXMLContentType, "testfiles/xml/IllformedNormalNonDefault.xml", null);
44
	}
45
//  [251659] - XMLContentDescriber no longer returns content types for invalid encodings
46
//	public void testFile106() throws CoreException, IOException {
47
//		doTest(expectedXMLContentType, "testfiles/xml/MalformedNoEncoding.xml", null);
48
//	}
44
//	}
45
//  [251659] - XMLContentDescriber no longer returns content types for invalid encodings
46
	public void testFile106() throws CoreException, IOException {
47
		doTest(expectedXMLContentType, "testfiles/xml/MalformedNoEncoding.xml", null);
48
	}
49
49
50
	/**
50
	/**
51
	 * This file is illformed in its specified charset
51
	 * This file is illformed in its specified charset
Lines 94-103 Link Here
94
//	public void testFile115() throws CoreException, IOException {
94
//	public void testFile115() throws CoreException, IOException {
95
//		doTest(expectedXMLContentType, "testfiles/xml/testIllFormed3.xml", java.nio.charset.IllegalCharsetNameException.class);
95
//		doTest(expectedXMLContentType, "testfiles/xml/testIllFormed3.xml", java.nio.charset.IllegalCharsetNameException.class);
96
//	}
96
//	}
97
97
//	[254504] XMLContentDescriber determines this to be INVALID content now
98
	public void testFile116() throws CoreException, IOException {
98
//	public void testFile116() throws CoreException, IOException {
99
		doTest(expectedXMLContentType, "testfiles/xml/testIllFormed4.xml", null);
99
//		doTest(expectedXMLContentType, "testfiles/xml/testIllFormed4.xml", null);
100
	}
100
//	}
101
101
102
	public void testFile117() throws CoreException, IOException {
102
	public void testFile117() throws CoreException, IOException {
103
		doTest(expectedXMLContentType, "testfiles/xml/testMultiLine.xml", null);
103
		doTest(expectedXMLContentType, "testfiles/xml/testMultiLine.xml", null);
Lines 117-123 Link Here
117
117
118
	public void testFile120WS() throws CoreException, IOException {
118
	public void testFile120WS() throws CoreException, IOException {
119
		// whitespace (CRLF) before xml declaration
119
		// whitespace (CRLF) before xml declaration
120
		doTest(expectedCustomXMLContentType, "testfiles/xml/testWSBeforeXMLDecl.xml", null);
120
		// [251748] Leading newlines can now be picked up by the XMLContentDescriber
121
		doTest(expectedXMLContentType, "testfiles/xml/testWSBeforeXMLDecl.xml", null);
121
	}
122
	}
122
123
123
	public void testFile120WS2() throws CoreException, IOException {
124
	public void testFile120WS2() throws CoreException, IOException {

Return to bug 254504