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/substr01.aql b/asterix-app/src/test/resources/runtimets/queries/string/substr01.aql
new file mode 100644
index 0000000..791e7c0
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/substr01.aql
@@ -0,0 +1,30 @@
+/*
+ * Testcase Name : substr01.aql
+ * Description : Test substring2(string,position) built in function.
+ * Success : Yes
+ * Date : 18th April 2012
+ */
+
+write output to nc1:"rttest/string_substr01.adm";
+
+let $str1:="Hello World"
+let $str2:=substring2($str1,10)
+
+let $str3:="This is a test string"
+let $str4:=substring2($str3,21)
+
+let $str5:="This is a test string"
+let $str6:=substring2($str5,22)
+
+let $str7:="This is a test string"
+let $str8:=substring2($str7,0)
+
+let $str9:="This is a test string"
+let $str10:=substring2($str9,-1)
+
+let $str11:="This is a test string"
+let $str12:="This is a another test string"
+let $str13:=substring2(string-concat([$str11,$str12]),21)
+
+let $str14:=substring2("UC Irvine",string-length("UC Irvine")/2)
+return { "str2":$str2,"str4":$str4,"str6":$str6,"str8":$str8,"str10":$str10,"str13":$str13,"str14":$str14}