add unfilled_triangle sketch test
This commit is contained in:
parent
84a3ca0a56
commit
d337f71513
2 changed files with 136 additions and 2 deletions
|
|
@ -3,7 +3,6 @@ package d2sketch_test
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/xml"
|
"encoding/xml"
|
||||||
"io/ioutil"
|
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
@ -1304,6 +1303,26 @@ a -> b: {
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "unfilled_triangle",
|
||||||
|
script: `
|
||||||
|
direction: right
|
||||||
|
|
||||||
|
A <-> B: default {
|
||||||
|
source-arrowhead.style.filled: false
|
||||||
|
target-arrowhead.style.filled: false
|
||||||
|
}
|
||||||
|
C <-> D: triangle {
|
||||||
|
source-arrowhead: {
|
||||||
|
shape: triangle
|
||||||
|
style.filled: false
|
||||||
|
}
|
||||||
|
target-arrowhead: {
|
||||||
|
shape: triangle
|
||||||
|
style.filled: false
|
||||||
|
}
|
||||||
|
}`,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
runa(t, tcs)
|
runa(t, tcs)
|
||||||
}
|
}
|
||||||
|
|
@ -1367,7 +1386,7 @@ func run(t *testing.T, tc testCase) {
|
||||||
assert.Success(t, err)
|
assert.Success(t, err)
|
||||||
err = os.MkdirAll(dataPath, 0755)
|
err = os.MkdirAll(dataPath, 0755)
|
||||||
assert.Success(t, err)
|
assert.Success(t, err)
|
||||||
err = ioutil.WriteFile(pathGotSVG, svgBytes, 0600)
|
err = os.WriteFile(pathGotSVG, svgBytes, 0600)
|
||||||
assert.Success(t, err)
|
assert.Success(t, err)
|
||||||
defer os.Remove(pathGotSVG)
|
defer os.Remove(pathGotSVG)
|
||||||
|
|
||||||
|
|
|
||||||
115
d2renderers/d2sketch/testdata/unfilled_triangle/sketch.exp.svg
vendored
Normal file
115
d2renderers/d2sketch/testdata/unfilled_triangle/sketch.exp.svg
vendored
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 67 KiB |
Loading…
Reference in a new issue