db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r538640 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest.java
Date Wed, 16 May 2007 16:17:34 GMT
Author: mamta
Date: Wed May 16 09:17:33 2007
New Revision: 538640

URL: http://svn.apache.org/viewvc?view=rev&rev=538640
Log:
DERBY-2335
Adding test cases so that one can check what is the collation on a database. It should be
either UCS_BASIC or TERRITORY_BASED.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest.java?view=diff&rev=538640&r1=538639&r2=538640
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest.java
Wed May 16 09:17:33 2007
@@ -69,6 +69,11 @@
       conn.setAutoCommit(false);
       Statement s = conn.createStatement();
 
+      //The collation should be UCS_BASIC for this database
+      checkLangBasedQuery(s, 
+      		"VALUES SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('derby.database.collation')",
+			new String[][] {{"UCS_BASIC"}});
+
       checkLangBasedQuery(s, "SELECT ID, NAME FROM CUSTOMER ORDER BY NAME",
       		new String[][] {{"4","Acorn"},{"0","Smith"},{"1","Zebra"},
       		{"6","aacorn"}, {"2","\u0104corn"},{"5","\u015Amith"},{"3","\u017Bebra"} });   
@@ -121,6 +126,11 @@
       conn.setAutoCommit(false);
       Statement s = conn.createStatement();
 
+      //The collation should be TERRITORY_BASED for this database
+      checkLangBasedQuery(s, 
+      		"VALUES SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('derby.database.collation')",
+			new String[][] {{"TERRITORY_BASED"}});
+
       checkLangBasedQuery(s, "SELECT ID, NAME FROM CUSTOMER ORDER BY NAME",
       		new String[][] {{"6","aacorn"}, {"4","Acorn"}, {"2","\u0104corn"},
       		{"0","Smith"},{"5","\u015Amith"}, {"1","Zebra"},{"3","\u017Bebra"} });
@@ -179,6 +189,11 @@
       conn.setAutoCommit(false);
       Statement s = conn.createStatement();
 
+      //The collation should be TERRITORY_BASED for this database
+      checkLangBasedQuery(s, 
+      		"VALUES SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('derby.database.collation')",
+			new String[][] {{"TERRITORY_BASED"}});
+
       checkLangBasedQuery(s, "SELECT ID, NAME FROM CUSTOMER ORDER BY NAME",
       		new String[][] {{"4","Acorn"}, {"2","\u0104corn"},{"0","Smith"},
       		{"5","\u015Amith"}, {"1","Zebra"},{"3","\u017Bebra"}, {"6","aacorn"} });
@@ -233,6 +248,11 @@
       Connection conn = ds.getConnection();
       conn.setAutoCommit(false);
       Statement s = conn.createStatement();
+
+      //The collation should be TERRITORY_BASED for this database
+      checkLangBasedQuery(s, 
+      		"VALUES SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY('derby.database.collation')",
+			new String[][] {{"TERRITORY_BASED"}});
 
       checkLangBasedQuery(s, "SELECT ID, NAME FROM CUSTOMER ORDER BY NAME",
       		new String[][] {{"6","aacorn"},{"4","Acorn"},{"2","\u0104corn"},{"0","Smith"},



Mime
View raw message