jaxp/test/javax/xml/jaxp/unittest/validation/tck/RegexWord.java
changeset 40223 64662417aa2d
parent 33895 be54598fdc8b
child 40829 ad509d5baa06
equal deleted inserted replaced
40222:ec0a4bdb7a07 40223:64662417aa2d
     1 /*
     1 /*
     2  * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    26 import javax.xml.XMLConstants;
    26 import javax.xml.XMLConstants;
    27 import javax.xml.transform.stream.StreamSource;
    27 import javax.xml.transform.stream.StreamSource;
    28 import javax.xml.validation.Schema;
    28 import javax.xml.validation.Schema;
    29 import javax.xml.validation.SchemaFactory;
    29 import javax.xml.validation.SchemaFactory;
    30 import javax.xml.validation.Validator;
    30 import javax.xml.validation.Validator;
       
    31 import org.testng.annotations.Listeners;
    31 import org.testng.annotations.Test;
    32 import org.testng.annotations.Test;
    32 import org.xml.sax.SAXException;
    33 import org.xml.sax.SAXException;
    33 
    34 
    34 /*
    35 /*
       
    36  * @test
    35  * @bug 8142900
    37  * @bug 8142900
       
    38  * @library /javax/xml/jaxp/libs /javax/xml/jaxp/unittest
       
    39  * @run testng/othervm -DrunSecMngr=true validation.tck.RegexWord
       
    40  * @run testng/othervm validation.tck.RegexWord
    36  * @summary Verifies that all characters except the set of "punctuation",
    41  * @summary Verifies that all characters except the set of "punctuation",
    37  * "separator" and "other" characters are accepted by \w [#x0000-#x10FFFF]-[\p{P}\p{Z}\p{C}]
    42  * "separator" and "other" characters are accepted by \w [#x0000-#x10FFFF]-[\p{P}\p{Z}\p{C}]
    38  * @author Joe Wang
    43  * @author Joe Wang
    39  */
    44  */
       
    45 @Listeners({jaxp.library.FilePolicy.class})
    40 public class RegexWord {
    46 public class RegexWord {
    41     static final String SCHEMA_LANGUAGE = "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
    47     static final String SCHEMA_LANGUAGE = "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
    42     static final String SCHEMA_SOURCE = "http://java.sun.com/xml/jaxp/properties/schemaSource";
    48     static final String SCHEMA_SOURCE = "http://java.sun.com/xml/jaxp/properties/schemaSource";
    43 
    49 
    44     /*
    50     /*
    55         Validator validator = schema.newValidator();
    61         Validator validator = schema.newValidator();
    56 
    62 
    57         validator.validate(new StreamSource(RegexWord.class.getResourceAsStream("reZ003vExc23082309.xml")));
    63         validator.validate(new StreamSource(RegexWord.class.getResourceAsStream("reZ003vExc23082309.xml")));
    58     }
    64     }
    59 }
    65 }
       
    66