浏览代码

jfinal 3.6

James 7 年之前
父节点
当前提交
75e253d250
共有 2 个文件被更改,包括 11 次插入16 次删除
  1. 4 2
      src/test/java/com/jfinal/template/SwitchTest.java
  2. 7 14
      src/test/java/com/jfinal/template/switch.txt

+ 4 - 2
src/test/java/com/jfinal/template/SwitchTest.java

@@ -2,6 +2,7 @@ package com.jfinal.template;
 
 
 import org.junit.AfterClass;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.BeforeClass;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.Test;
 import com.jfinal.kit.Kv;
 import com.jfinal.kit.Kv;
 
 
@@ -19,11 +20,12 @@ public class SwitchTest {
 	public static void exit() {
 	public static void exit() {
 	}
 	}
 	
 	
+	@Ignore
 	@Test
 	@Test
 	public void switch_() {
 	public void switch_() {
 		Template template = engine.getTemplate("com/jfinal/template/switch.txt");
 		Template template = engine.getTemplate("com/jfinal/template/switch.txt");
-		Kv kv = Kv.by("data", 123);
+		Kv kv = Kv.by("data", 123).set("b", 123);
 		String ret = template.renderToString(kv);
 		String ret = template.renderToString(kv);
-		System.out.println(ret);
+		System.out.print(ret);
 	}
 	}
 }
 }

+ 7 - 14
src/test/java/com/jfinal/template/switch.txt

@@ -1,17 +1,10 @@
-#switch (data)
-
- #default
-   default
-
- #case (111)
+#switch(data)
+  #case (111)
     111
     111
- #case (123)
+  #case(a, b, c)
+    a, b, c
+  #default
+    default
+  #case (123)
     123
     123
-    
-   
- #case (a, b, c)
-    a, b , c
- 
 #end
 #end
-
-#(data)