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