comparison zs_test.go @ 6:cb66f5b86616 draft

rewritted default variables assignment
author zaitsev.serge
date Fri, 05 Dec 2014 18:26:15 +0000
parents e0ee0721d34f
children 0214b1b5f5eb
comparison
equal deleted inserted replaced
5:e0ee0721d34f 6:cb66f5b86616
30 t.Fail() 30 t.Fail()
31 } 31 }
32 } 32 }
33 33
34 func TestMD(t *testing.T) { 34 func TestMD(t *testing.T) {
35 v, body := md(` 35 v, body := md("foo.md", `
36 title: Hello, world! 36 title: Hello, world!
37 keywords: foo, bar, baz 37 keywords: foo, bar, baz
38 empty: 38 empty:
39 bayan: [:|||:] 39 bayan: [:|||:]
40 40
54 if body != "this: is a content" { 54 if body != "this: is a content" {
55 t.Error(body) 55 t.Error(body)
56 } 56 }
57 57
58 // Test empty md 58 // Test empty md
59 v, body = md("") 59 v, body = md("foo.md", "")
60 if len(v) != 0 || len(body) != 0 { 60 if len(v) != 0 || len(body) != 0 {
61 t.Error(v, body) 61 t.Error(v, body)
62 } 62 }
63 63
64 // Test empty header 64 // Test empty header
65 v, body = md("Hello") 65 v, body = md("foo.md", "Hello")
66 if len(v) != 0 || body != "Hello" { 66 if len(v) != 0 || body != "Hello" {
67 t.Error(v, body) 67 t.Error(v, body)
68 } 68 }
69 } 69 }
70 70