Search Apps Documentation Source Content File Folder Download Copy Actions Download

z_blog_2_filetest.gno

0.86 Kb · 25 lines
 1package main
 2
 3import (
 4	"testing"
 5
 6	"gno.land/p/lou/blog"
 7)
 8
 9func main() {
10	user := address("g14x2crt492f84shxa9s7e5ulk7lnf2p3euz7r9n")
11	testing.SetRealm(testing.NewUserRealm(user))
12	testing.SetRealm(testing.NewCodeRealm("gno.land/r/test"))
13	testBlog, err := blog.NewBlog("test blog", user)
14	if err != nil {
15		println(err.Error())
16	}
17	println(testBlog.Render(""))
18}
19
20// Output:
21// # test blog
22//
23// [⊞ grid](/r/test:?mode=grid) | [≔ list](/r/test:?mode=list) | [⧖ relative](/r/test:?time=short) | [↕ alphabetical \(A\-Z\)](/r/test:?order=asc&sort=alpha) | [↕ recent](/r/test:?order=asc&sort=recent) | [↕ last updated](/r/test:?order=asc&sort=update) | [past year](/r/test:?end=2009-02-13&start=2008-02-13), [this year](/r/test:?end=2009-02-13&start=2009-01-01), [last 30 days](/r/test:?end=2009-02-13&start=2009-01-14) | [⟳ reset](/r/test)
24//
25// No posts found.