Added string function tests
git-svn-id: https://asterixdb.googlecode.com/svn/branches/asterix_stabilization@636 eaa15691-b419-025a-1212-ee371bd00084
diff --git a/asterix-app/src/test/resources/runtimets/queries/string/substr06.aql b/asterix-app/src/test/resources/runtimets/queries/string/substr06.aql
new file mode 100644
index 0000000..82d21c2
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/substr06.aql
@@ -0,0 +1,32 @@
+/*
+ * Description : Test substring2(string,position) built in function.
+ * Success : Yes
+ * Date : 19th April 2012
+ */
+
+// To test substring function with string data stored in an internal dataset.
+
+drop dataverse test if exists;
+create dataverse test;
+use dataverse test;
+
+create type TestType as open {
+name : string
+}
+
+create dataset testdst(TestType) partitioned by key name;
+
+insert into dataset testdst({"name":"UC Berkeley"});
+insert into dataset testdst({"name":"UC Irvine"});
+insert into dataset testdst({"name":"UC LA"});
+insert into dataset testdst({"name":"UC Riverside"});
+insert into dataset testdst({"name":"UC San Diego"});
+insert into dataset testdst({"name":"UC Santa Barbara"});
+insert into dataset testdst({"name":"UT Austin "});
+insert into dataset testdst({"name":"UT Dallas"});
+
+write output to nc1:"rttest/string_substr06.adm";
+
+for $a in dataset('testdst')
+order by $a.name
+return substring2($a.name,4);