summaryrefslogtreecommitdiffstats
path: root/write_test.go
diff options
context:
space:
mode:
authorclsr <clsr@clsr.net>2021-12-23 01:54:47 +0000
committerclsr <clsr@clsr.net>2021-12-23 02:51:49 +0000
commit43428e759d9fbc5a319c2b929bfb4469938cc386 (patch)
tree1ee452ff23249bf10653481599f8639aa46ceb25 /write_test.go
parent690a7183d7eca35b59e23e556b0c6492df08ffa5 (diff)
downloadcnm-go-43428e759d9fbc5a319c2b929bfb4469938cc386.tar.gz
cnm-go-43428e759d9fbc5a319c2b929bfb4469938cc386.zip
Add EscapeAll and escape all spaces in linksHEADv0.4.2master
Diffstat (limited to 'write_test.go')
-rw-r--r--write_test.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/write_test.go b/write_test.go
index 18809b1..8cca449 100644
--- a/write_test.go
+++ b/write_test.go
@@ -13,22 +13,23 @@ var writeTests = map[string]*Document{
},
"title\n\tfoo bar baz\n" +
- "links\n\tqwe asd\n\tzxc 123\n\tfoo\n" +
- "site\n\tfoo\n\t\tbar\n\t\tbaz/quux\n\t\t\t123\n\ttest\n": &Document{
+ "links\n\tqwe\\ asd zxc 123\n\tfoo\n" +
+ "site\n\tfoo Foo\n\t\tbar\n\t\tbaz/qu\\ ux Test\n\t\t\t123\n\ttest\n": &Document{
Title: "foo bar baz",
Links: []Link{
- Link{"qwe", "asd", ""},
- Link{"zxc", "123", ""},
+ Link{"qwe asd", "zxc 123", ""},
Link{"foo", "", ""},
},
Site: Site{
Children: []Site{
Site{
Path: "foo",
+ Name: "Foo",
Children: []Site{
Site{Path: "bar"},
Site{
- Path: "baz/quux",
+ Path: "baz/qu ux",
+ Name: "Test",
Children: []Site{
Site{Path: "123"},
},