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/substr04.aql b/asterix-app/src/test/resources/runtimets/queries/string/substr04.aql
new file mode 100644
index 0000000..880499c
--- /dev/null
+++ b/asterix-app/src/test/resources/runtimets/queries/string/substr04.aql
@@ -0,0 +1,21 @@
+/*
+ * Testcase Name : substr04.aql
+ * Description : Test substring2(string,position,position) built in function.
+ * Success : Yes
+ * Date : 18th April 2012
+ */
+
+write output to nc1:"rttest/string_substr04.adm";
+
+for $a in [ substring2("hello world",7,11),
+substring2("hello world",1,11),
+substring2("hello world",3,7),
+substring2("ABCD",3,6),
+substring2("ABCD",0,4),
+substring2("UC Irvine",4,string-length("UC Irvine")),
+substring2("UC Irvine",0,string-length("UC Irvine")),
+substring2("UC Irvine",1,string-length("UC Irvine")),
+substring2(substring2("UC Irvine",4),0,string-length("Irvine")),
+substring2(substring2("UC Irvine",4),0,(string-length("Irvine")/2))
+]
+return $a