Skip to content Search Apps Documentation Source Content File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

escape_test.gno

0.69 Kb · 17 lines
 1package soundexdemo
 2
 3import (
 4	"testing"
 5
 6	"gno.land/p/nt/uassert/v0"
 7)
 8
 9// payload closes a one-backtick code span and opens an image. Written raw, as
10// v0 does, it renders as markup the realm appears to have authored.
11const payload = "x` ![p](https:e.io) `y"
12
13// TestRenderEscapesPath pins that the echoed name is a code span it cannot
14// close: v0 wrote it between two hand-placed backticks (gno-contracts#359).
15func TestRenderEscapesPath(t *testing.T) {
16	uassert.Equal(t, "# Soundex\n\nPhonetic keys for English names, demoing the [`p/moul/x/daily/soundex`](/p/moul/x/daily/soundex/v0) library.\n\n## ``x` ![p](https:e.io) `y``\n\nkey: **X131** (normalized: `XPHTTPSEIOY`)\n", Render("/"+payload))
17}