Revision: 4844
http://sourceforge.net/p/vexi/code/4844
Author: mkpg2
Date: 2016-02-15 05:52:24 +0000 (Mon, 15 Feb 2016)
Log Message:
-----------
Testing. Just seeing how the regexps work.
Added Paths:
-----------
branches/vexi3/org.vexi-library.js/src/test/java/org/ibex/js/TestJSRegexp.java
Added:
branches/vexi3/org.vexi-library.js/src/test/java/org/ibex/js/TestJSRegexp.java
===================================================================
---
branches/vexi3/org.vexi-library.js/src/test/java/org/ibex/js/TestJSRegexp.java
(rev 0)
+++
branches/vexi3/org.vexi-library.js/src/test/java/org/ibex/js/TestJSRegexp.java
2016-02-15 05:52:24 UTC (rev 4844)
@@ -0,0 +1,28 @@
+package org.ibex.js;
+
+/*expected*/
+public class TestJSRegexp{
+ final JSRegexp regex;
+ public TestJSRegexp() throws JSExn {
+ regex = new JSRegexp(JSU.S("^[0-9]+$"),null);//, JSU.S("g"));
+ }
+
+ static private JS call(JSRegexp re, String method, String arg) throws
JSExn{
+ return re.callMethod(re, JSU.S(method), new JS[]{JSU.S(arg)});
+ }
+
+ private boolean testNumber(String number) throws JSExn{
+ return JSU.toBoolean(call(regex, "test", number));
+ }
+
+ public void testMatchNumber() throws Exception {
+ System.err.println(testNumber("abcd"));
+ System.err.println(testNumber("123"));
+ System.err.println(testNumber("1ab"));
+ System.err.println(testNumber("ab23"));
+ }
+
+ static public void main(String[] args) throws Exception {
+ new TestJSRegexp().testMatchNumber();
+ }
+}
Property changes on:
branches/vexi3/org.vexi-library.js/src/test/java/org/ibex/js/TestJSRegexp.java
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Vexi-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vexi-svn