You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by jc...@apache.org on 2012/09/14 15:01:13 UTC

svn commit: r1384750 - in /sling/trunk/testing/junit/scriptable/src/test: ./ java/ java/org/ java/org/apache/ java/org/apache/sling/ java/org/apache/sling/junit/ java/org/apache/sling/junit/tests/ java/org/apache/sling/junit/tests/TestAllPathsTest.java

Author: jckautzmann
Date: Fri Sep 14 13:01:12 2012
New Revision: 1384750

URL: http://svn.apache.org/viewvc?rev=1384750&view=rev
Log:
SLING-2594 - server-side test script without TEST_PASSED string should fail

Added:
    sling/trunk/testing/junit/scriptable/src/test/
    sling/trunk/testing/junit/scriptable/src/test/java/
    sling/trunk/testing/junit/scriptable/src/test/java/org/
    sling/trunk/testing/junit/scriptable/src/test/java/org/apache/
    sling/trunk/testing/junit/scriptable/src/test/java/org/apache/sling/
    sling/trunk/testing/junit/scriptable/src/test/java/org/apache/sling/junit/
    sling/trunk/testing/junit/scriptable/src/test/java/org/apache/sling/junit/tests/
    sling/trunk/testing/junit/scriptable/src/test/java/org/apache/sling/junit/tests/TestAllPathsTest.java   (with props)

Added: sling/trunk/testing/junit/scriptable/src/test/java/org/apache/sling/junit/tests/TestAllPathsTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/testing/junit/scriptable/src/test/java/org/apache/sling/junit/tests/TestAllPathsTest.java?rev=1384750&view=auto
==============================================================================
--- sling/trunk/testing/junit/scriptable/src/test/java/org/apache/sling/junit/tests/TestAllPathsTest.java (added)
+++ sling/trunk/testing/junit/scriptable/src/test/java/org/apache/sling/junit/tests/TestAllPathsTest.java Fri Sep 14 13:01:12 2012
@@ -0,0 +1,44 @@
+/*************************************************************************
+ *
+ * ADOBE CONFIDENTIAL
+ * __________________
+ *
+ *  Copyright 2012 Adobe Systems Incorporated
+ *  All Rights Reserved.
+ *
+ * NOTICE:  All information contained herein is, and remains
+ * the property of Adobe Systems Incorporated and its suppliers,
+ * if any.  The intellectual and technical concepts contained
+ * herein are proprietary to Adobe Systems Incorporated and its
+ * suppliers and are protected by trade secret or copyright law.
+ * Dissemination of this information or reproduction of this material
+ * is strictly forbidden unless prior written permission is obtained
+ * from Adobe Systems Incorporated.
+ **************************************************************************/
+package java.org.apache.sling.junit.tests;
+
+import org.junit.Test;
+import org.apache.sling.junit.scriptable.TestAllPaths;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+public class TestAllPathsTest {
+
+    @Test
+    public void checkTestTest() throws Exception {
+        final String comment =      "# this is a comment" + "\n";
+        final String empty =        "    " + "\n";
+        final String testPassed =   "TEST_PASSED" + "\n";
+        final String any =          "this is any line" + " \n";
+        final String script1 = comment +  empty + testPassed;
+        final String script2 = comment +  empty + testPassed + testPassed;
+        final String script3 = comment +  empty + testPassed + any;
+        final String script4 = comment +  empty;
+        assertTrue(TestAllPaths.checkTest(script1));
+        assertFalse(TestAllPaths.checkTest(script2));
+        assertFalse(TestAllPaths.checkTest(script3));
+        assertFalse(TestAllPaths.checkTest(script4));
+    }
+
+}

Propchange: sling/trunk/testing/junit/scriptable/src/test/java/org/apache/sling/junit/tests/TestAllPathsTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: sling/trunk/testing/junit/scriptable/src/test/java/org/apache/sling/junit/tests/TestAllPathsTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision Rev URL