z_3_h_filetest.gno
0.54 Kb ยท 32 lines
1package main
2
3import (
4 "std"
5 "strings"
6 "testing"
7
8 boards2 "gno.land/r/gnoland/boards2/v1"
9)
10
11const (
12 owner = std.Address("g16jpf0puufcpcjkph5nxueec8etpcldz7zwgydq") // @devx
13 name = "foo123"
14)
15
16var newName string
17
18func init() {
19 newName = strings.Repeat("A", boards2.MaxBoardNameLength+1)
20
21 testing.SetRealm(std.NewUserRealm(owner))
22 boards2.CreateBoard(cross, name, false)
23}
24
25func main() {
26 testing.SetRealm(std.NewUserRealm(owner))
27
28 boards2.RenameBoard(cross, name, newName)
29}
30
31// Error:
32// board name is too long, maximum allowed is 50 characters