Tests for #if( !$foo) and the like added...
PR:
Obtained from:
Submitted by:
Reviewed by:
git-svn-id: https://svn.apache.org/repos/asf/jakarta/velocity/trunk@74031 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/test/templates/compare/ifstatement.cmp b/test/templates/compare/ifstatement.cmp
index 7b70238..8e3d6d3 100644
--- a/test/templates/compare/ifstatement.cmp
+++ b/test/templates/compare/ifstatement.cmp
@@ -5,10 +5,25 @@
right
+ right
+
+ right
+
+ right
+
+ right
+
+
right
right
right
+ right
+
+ right
+
+ right
+
done
diff --git a/test/templates/ifstatement.vm b/test/templates/ifstatement.vm
index bd86c47..b67cfa9 100644
--- a/test/templates/ifstatement.vm
+++ b/test/templates/ifstatement.vm
@@ -17,6 +17,29 @@
right
#end
+#if(!$foo)
+ wrong
+#else
+ right
+#end
+
+#if( !$foo )
+ wrong
+#else
+ right
+#end
+
+#if( ! $foo )
+ wrong
+#else
+ right
+#end
+
+#if( ! ! $foo )
+ right
+#end
+
+
#if($bar)
wrong
#else
@@ -39,4 +62,18 @@
right
#end
+#if(!$bar)
+ right
+#end
+
+#if( !$bar)
+ right
+#end
+
+#if( !!$bar)
+ wrong
+#else
+ right
+#end
+
done