move tests to stable from todo

This commit is contained in:
Gavin Nishizawa 2022-11-07 19:35:06 -08:00
parent d89a564bb1
commit ed8c8ea157
8 changed files with 71 additions and 65 deletions

View file

@ -638,6 +638,41 @@ func RegisterHash(h Hash, f func() hash.Hash) {
|
x -> hey -> y`,
},
{
name: "md_code_inline",
script: `md: |md
` + "`code`" + `
|
a -> md -> b
`,
},
{
name: "md_code_block_fenced",
script: `md: |md
` + "```" + `
{
fenced: "block",
of: "json",
}
` + "```" + `
|
a -> md -> b
`,
},
{
name: "md_code_block_indented",
script: `md: |md
a line of text and an
{
indented: "block",
of: "json",
}
|
a -> md -> b
`,
},
}
runa(t, tcs)

View file

Before

Width:  |  Height:  |  Size: 841 KiB

After

Width:  |  Height:  |  Size: 841 KiB

View file

@ -8,8 +8,8 @@
"x": 0,
"y": 226
},
"width": 208,
"height": 24,
"width": 212,
"height": 151,
"level": 1,
"opacity": 1,
"strokeDash": 0,
@ -27,7 +27,7 @@
"fields": null,
"methods": null,
"columns": null,
"label": "{\n indented: \"block\",\n of: \"json\",\n}",
"label": "a line of text and an\n\n\t{\n\t\tindented: \"block\",\n\t\tof: \"json\",\n\t}\n",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "markdown",
@ -35,14 +35,14 @@
"italic": false,
"bold": true,
"underline": false,
"labelWidth": 208,
"labelHeight": 24
"labelWidth": 212,
"labelHeight": 151
},
{
"id": "a",
"type": "",
"pos": {
"x": 48,
"x": 50,
"y": 0
},
"width": 113,
@ -80,8 +80,8 @@
"id": "b",
"type": "",
"pos": {
"x": 48,
"y": 350
"x": 50,
"y": 477
},
"width": 113,
"height": 126,
@ -142,19 +142,19 @@
"labelPercentage": 0,
"route": [
{
"x": 104,
"x": 106,
"y": 126
},
{
"x": 104,
"x": 106,
"y": 166
},
{
"x": 104,
"x": 106,
"y": 186
},
{
"x": 104,
"x": 106,
"y": 226
}
],
@ -189,20 +189,20 @@
"labelPercentage": 0,
"route": [
{
"x": 104,
"y": 250
"x": 106,
"y": 377
},
{
"x": 104,
"y": 290
"x": 106,
"y": 417
},
{
"x": 104,
"y": 310
"x": 106,
"y": 437
},
{
"x": 104,
"y": 350
"x": 106,
"y": 477
}
],
"isCurve": true,

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 660 KiB

After

Width:  |  Height:  |  Size: 841 KiB

View file

Before

Width:  |  Height:  |  Size: 841 KiB

After

Width:  |  Height:  |  Size: 841 KiB

View file

@ -6,45 +6,7 @@ import (
)
func testTodo(t *testing.T) {
tcs := []testCase{
// https://github.com/terrastruct/d2/issues/24
// string monstrosity from not being able to escape backticks within string literals
{
name: "md_code_inline",
script: `md: |md
` + "`code`" + `
|
a -> md -> b
`,
},
{
name: "md_code_block_fenced",
script: `md: |md
` + "```" + `
{
fenced: "block",
of: "json",
}
` + "```" + `
|
a -> md -> b
`,
},
{
name: "md_code_block_indented",
script: `md: |md
a line of text and an
{
indented: "block",
of: "json",
}
|
a -> md -> b
`,
},
}
tcs := []testCase{}
runa(t, tcs)
}