Project

General

Profile

« Previous | Next » 

Revision 5744

Added by berkley over 13 years ago

a test to explore character encoding with utf8 chars

View differences:

NonAsciiCharacterTest.java
269 269
        TestSuite suite = new TestSuite();
270 270
        suite.addTest(new NonAsciiCharacterTest("initialize"));
271 271
        // Test basic functions
272
        suite.addTest(new NonAsciiCharacterTest("invalidXMLCharacters201Test"));
272
        /*suite.addTest(new NonAsciiCharacterTest("invalidXMLCharacters201Test"));
273 273
        suite.addTest(new NonAsciiCharacterTest("invalidXMLCharacters210Test"));
274 274
        suite.addTest(new NonAsciiCharacterTest("symbolEncodedFormat201Test"));
275 275
        suite.addTest(new NonAsciiCharacterTest("symbolEncodedFormat210Test"));
276 276
        suite.addTest(new NonAsciiCharacterTest("quote201Test"));
277 277
        suite.addTest(new NonAsciiCharacterTest("quote210Test"));
278 278
        suite.addTest(new NonAsciiCharacterTest("numericCharacterReferenceFormat201Test"));
279
        suite.addTest(new NonAsciiCharacterTest("numericCharacterReferenceFormat210Test"));
279
        suite.addTest(new NonAsciiCharacterTest("numericCharacterReferenceFormat210Test"));*/
280 280
        suite.addTest(new NonAsciiCharacterTest("nonLatinUnicodeCharacter201Test"));
281
        suite.addTest(new NonAsciiCharacterTest("nonLatinUnicodeCharacter210Test"));
281
        //suite.addTest(new NonAsciiCharacterTest("nonLatinUnicodeCharacter210Test"));
282 282

  
283 283
        return suite;
284 284
    }
......
503 503
     * Test inserting and reading an EML 2.0.1 document with the code representation 
504 504
     * of a micro sign (&#181). Read should succeed since the same document should be 
505 505
     * read back from disk that was submitted.  Query should succeed because we look 
506
     * for the converted character (µ).
506
     * for the converted character (µ).
507 507
     */
508 508
    public void numericCharacterReferenceFormat201Test() {
509 509
    	debug("\nRunning: numericCharacterReferenceFormat201Test");
......
512 512
            m.login(username, password);
513 513
            
514 514
            String testTitle = "Checking µ in doc: " + newdocid  + ".1";
515
            String convertedTestTitle = "Checking µ in doc: " + newdocid  + ".1";
515
            String convertedTestTitle = "Checking µ in doc: " + newdocid  + ".1";
516 516
            
517 517
            testdocument = getTestEmlDoc(testTitle, EML2_0_1);
518 518
            insertDocid(newdocid + ".1", testdocument, SUCCESS, true);
......
543 543
     * Test inserting and reading an EML 2.1.0 document with the code representation 
544 544
     * of a micro sign (&#181). Read should succeed since the same document should be 
545 545
     * read back from disk that was submitted.  Query should succeed because we look 
546
     * for the converted character (µ).
546
     * for the converted character (µ).
547 547
     */
548 548
    public void numericCharacterReferenceFormat210Test() {
549 549
    	debug("\nRunning: numericCharacterReferenceFormat210Test");
......
552 552
            m.login(username, password);
553 553
            
554 554
            String testTitle = "Checking µ in doc: " + newdocid  + ".1";
555
            String convertedTestTitle = "Checking µ in doc: " + newdocid  + ".1";
555
            String convertedTestTitle = "Checking µ in doc: " + newdocid  + ".1";
556 556
            
557 557
            testdocument = getTestEmlDoc(testTitle, EML2_1_0);
558 558
            insertDocid(newdocid + ".1", testdocument, SUCCESS, true);
......
580 580
    }
581 581

  
582 582
    /**
583
     * Test inserting and reading an EML 2.0.1 document with the micro sign (µ). 
583
     * Test inserting and reading an EML 2.0.1 document with the micro sign (µ). 
584 584
     * Read should succeed since the same document should be read back from disk 
585 585
     * that was submitted.  Query should succeed because we look for the same 
586
     * character (µ).
586
     * character (µ).
587 587
     */
588 588
    public void nonLatinUnicodeCharacter201Test() {
589 589
    	debug("\nRunning: nonLatinUnicodeCharacter201Test");
......
619 619
    }
620 620
    
621 621
    /**
622
     * Test inserting and reading an EML 2.1.0 document with the micro sign (µ). 
622
     * Test inserting and reading an EML 2.1.0 document with the micro sign (µ). 
623 623
     * Read should succeed since the same document should be read back from disk 
624 624
     * that was submitted.  Query should succeed because we look for the same 
625
     * character (µ).
625
     * character (µ).
626 626
     */
627 627
    public void nonLatinUnicodeCharacter210Test() {
628 628
    	debug("\nRunning: nonLatinUnicodeCharacter210Test");
......
630 630
            String newdocid = generateDocid();
631 631
            m.login(username, password);
632 632
            
633
            String testTitle = "Checking characters like µ in doc: " + newdocid  + ".1";
633
            String testTitle = "Checking characters like µ in doc: " + newdocid  + ".1";
634 634
            
635 635
            testdocument = getTestEmlDoc(testTitle, EML2_1_0);
636 636
            insertDocid(newdocid + ".1", testdocument, SUCCESS, false);

Also available in: Unified diff