Browse Source

Regression tests were added

See the xml-examples/test dir.
Serj Kalichev 12 years ago
parent
commit
2f8a25ffb4
2 changed files with 51 additions and 0 deletions
  1. 10 0
      xml-examples/test/startup.xml
  2. 41 0
      xml-examples/test/test.xml

+ 10 - 0
xml-examples/test/startup.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CLISH_MODULE xmlns="http://clish.sourceforge.net/XMLSchema" 
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+ xsi:schemaLocation="http://clish.sourceforge.net/XMLSchema
+                     http://clish.sourceforge.net/XMLSchema/clish.xsd">
+
+	<STARTUP view="test-view">
+	</STARTUP>
+
+</CLISH_MODULE>

+ 41 - 0
xml-examples/test/test.xml

@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CLISH_MODULE xmlns="http://clish.sourceforge.net/XMLSchema" 
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+ xsi:schemaLocation="http://clish.sourceforge.net/XMLSchema
+                     http://clish.sourceforge.net/XMLSchema/clish.xsd">
+	<!--=======================================================-->
+
+<VIEW name="test-view"
+	prompt="${SYSTEM_NAME}# ">
+
+	<COMMAND name="exit" help="Exit from the CLI" lock="false">
+		<ACTION builtin="clish_close"/>
+	</COMMAND>
+
+	<COMMAND name="test1" help="" lock="false">
+		<ACTION> echo "Empty attribute" </ACTION>
+	</COMMAND>
+
+	<COMMAND name="test2" help='Single quotes' lock="false">
+		<ACTION> echo "Single quotes" </ACTION>
+	</COMMAND>
+
+	<COMMAND name="test3" help='"Single quotes with nested common quotes"' lock="false">
+		<ACTION> echo "Single quotes with nested common quotes" </ACTION>
+	</COMMAND>
+
+	<COMMAND name="test4" help="'Common quotes with nested single quotes'" lock="false">
+		<ACTION> echo "Common quotes with nested single quotes" </ACTION>
+	</COMMAND>
+
+	<COMMAND name="test5" help="Broken comment">
+<!--		<PARAM name="test5.param1" help="ttt" ptype="STRING" test='! -z "www"'/>
+-->
+		<PARAM name="test5.param2" help="Help test5.param2" ptype="STRING" optional="true" order="true"/>
+		<ACTION> echo "Broken comment" </ACTION>
+	</COMMAND>
+
+
+</VIEW>
+
+</CLISH_MODULE>