Search Apps Documentation Source Content File Folder Download Copy Actions Download

z_create_reply_12_filetest.gno

0.74 Kb · 34 lines
 1// PKGPATH: gno.land/r/gnoland/boards2/v1/filetests/z_create_reply_12_filetest
 2
 3package z_create_reply_12_filetest
 4
 5import (
 6	"strings"
 7	"testing"
 8
 9	"gno.land/p/gnoland/boards"
10
11	boards2 "gno.land/r/gnoland/boards2/v1"
12)
13
14const owner address = "g1rp7cmetn27eqlpjpc4vuusf8kaj746tysc0qgh"
15
16var (
17	bid boards.ID
18	tid boards.ID
19)
20
21func init(cur realm) {
22	testing.SetRealm(testing.NewUserRealm(owner))
23	bid = boards2.CreateBoard(cross(cur), "test-board", false, false)
24	tid = boards2.CreateThread(cross(cur), bid, "Foo", "bar")
25}
26
27func main(cur realm) {
28	testing.SetRealm(testing.NewUserRealm(owner))
29
30	boards2.CreateReply(cross(cur), bid, tid, 0, strings.Repeat("x", boards2.MaxReplyLength+1))
31}
32
33// Error:
34// reply is too long, maximum allowed is 10000 characters