db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r1489924 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting: functionTests/master/ functionTests/suites/ functionTests/tests/i18n/ junit/
Date Wed, 05 Jun 2013 15:36:47 GMT
Author: kmarsden
Date: Wed Jun  5 15:36:47 2013
New Revision: 1489924

URL: http://svn.apache.org/r1489924
Log:
DERBY-6244 convert i18n/caseI_tr_TR.sql to JUni

Added:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/i18n/CaseI_tr_TRTest.java
  (with props)
Removed:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/caseI_tr_TR.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/i18n/caseI_tr_TR.sql
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/i18n/caseI_tr_TR_app.properties
Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/i18nTest.runall
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/i18n/_Suite.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/Decorator.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/i18nTest.runall
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/i18nTest.runall?rev=1489924&r1=1489923&r2=1489924&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/i18nTest.runall
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/i18nTest.runall
Wed Jun  5 15:36:47 2013
@@ -1,5 +1,4 @@
 i18n/I18NImportExport.sql
 i18n/urlLocale.sql
 i18n/messageLocale.sql
-i18n/caseI_tr_TR.sql
 i18n/iepnegativetests_ES.sql

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/i18n/CaseI_tr_TRTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/i18n/CaseI_tr_TRTest.java?rev=1489924&view=auto
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/i18n/CaseI_tr_TRTest.java
(added)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/i18n/CaseI_tr_TRTest.java
Wed Jun  5 15:36:47 2013
@@ -0,0 +1,84 @@
+/**
+ *  Derby - Class org.apache.derbyTesting.functionTests.tests.i8n.caseI_tr_TR
+ *  
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.derbyTesting.functionTests.tests.i18n;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.Properties;
+
+import junit.framework.Test;
+
+import org.apache.derbyTesting.junit.BaseJDBCTestCase;
+import org.apache.derbyTesting.junit.DatabasePropertyTestSetup;
+import org.apache.derbyTesting.junit.Decorator;
+import org.apache.derbyTesting.junit.JDBC;
+import org.apache.derbyTesting.junit.TestConfiguration;
+
+public class CaseI_tr_TRTest extends BaseJDBCTestCase {
+
+    public CaseI_tr_TRTest(String name) {
+        super(name);
+    }
+ 
+    /**
+     * Test Turkish I casing.  Turkish has two i's. lower case i upper cases 
+     * to a upper case i with a dot. Lowercase i with no dot uppercases to I with
+     * no dot.
+     * @throws SQLException
+     */
+    public void testTurkishIcase() throws SQLException {
+        PreparedStatement ps = prepareStatement("values UCASE(?)");
+        ps.setString(1, "i");
+        //\u0130 is upper case i with a dot
+        JDBC.assertSingleValueResultSet(ps.executeQuery(),
+                "\u0130");
+ 
+        // \u0131 is lower case i no dot
+        ps.setString(1, "\u0131");       
+        JDBC.assertSingleValueResultSet(ps.executeQuery(),
+                "I");
+
+        PreparedStatement ps2 = prepareStatement("values LCASE(?)");
+        ps2.setString(1, "I");
+        JDBC.assertSingleValueResultSet(ps2.executeQuery(),
+                "\u0131");
+        
+        ps2.setString(1, "\u0130");
+        JDBC.assertSingleValueResultSet(ps2.executeQuery(),
+                "i");
+        
+
+ 
+        
+    }
+    
+    public static Test suite() {
+        Test test = TestConfiguration.defaultSuite(CaseI_tr_TRTest.class);
+        Properties attributes = new Properties();
+        attributes.put("territory","tr_TR");
+        return Decorator.attributesDatabase(attributes, test);
+    }
+}
+
+    

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/i18n/CaseI_tr_TRTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/i18n/_Suite.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/i18n/_Suite.java?rev=1489924&r1=1489923&r2=1489924&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/i18n/_Suite.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/i18n/_Suite.java
Wed Jun  5 15:36:47 2013
@@ -57,6 +57,7 @@ public class _Suite extends BaseTestCase
         suite.addTest(LocalizedAttributeScriptTest.suite());
         suite.addTest(LocalizedDisplayScriptTest.suite());
         suite.addTest(JapanCodeConversionTest.suite());
+        suite.addTest(CaseI_tr_TRTest.suite());
 
         return suite;
 	}

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/Decorator.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/Decorator.java?rev=1489924&r1=1489923&r2=1489924&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/Decorator.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/Decorator.java Wed Jun
 5 15:36:47 2013
@@ -213,7 +213,7 @@ public class Decorator {
      * @param test Test to decorate
      * @return Decorated test
      */
-    private static Test attributesDatabase(
+    public static Test attributesDatabase(
             final Properties attributes, Test test)
     {
         test = new ChangeConfigurationSetup(test) {



Mime
View raw message