diff zs_test.go @ 2:fd79b3a90bef draft

fixed empty header in markdown
author zaitsev.serge
date Fri, 05 Dec 2014 17:09:10 +0000
parents d647affd8ae9
children 05fc24caac37
line wrap: on
line diff
--- a/zs_test.go	Fri Dec 05 17:05:46 2014 +0000
+++ b/zs_test.go	Fri Dec 05 17:09:10 2014 +0000
@@ -46,6 +46,18 @@
 	if body != "this: is a content" {
 		t.Error(body)
 	}
+
+	// Test empty md
+	v, body = md("")
+	if len(v) != 0 || len(body) != 0 {
+		t.Error(v, body)
+	}
+
+	// Test empty header
+	v, body = md("Hello")
+	if len(v) != 0 || body != "Hello" {
+		t.Error(v, body)
+	}
 }
 
 func TestRender(t *testing.T) {