diff --git a/d2renderers/d2sketch/sketch_test.go b/d2renderers/d2sketch/sketch_test.go index f35eb1be7..ede3851f9 100644 --- a/d2renderers/d2sketch/sketch_test.go +++ b/d2renderers/d2sketch/sketch_test.go @@ -280,6 +280,51 @@ shipments.order_id <-> orders.id`, +getJobs(): "Job[]" +setTimeout(seconds int) } +`, + }, + { + name: "arrowheads", + script: ` +a.0 <-> b.0: <-> +a.1 -- b.1: -- +a.2 <-> b.2: arrow { + source-arrowhead.shape: arrow + target-arrowhead.shape: arrow +} +a.3 <-> b.3: triangle { + source-arrowhead.shape: triangle + target-arrowhead.shape: triangle +} +a.4 <-> b.4: diamond { + source-arrowhead.shape: diamond + target-arrowhead.shape: diamond +} +a.5 <-> b.5: diamond filled { + source-arrowhead: { + shape: diamond + style.filled: true + } + target-arrowhead: { + shape: diamond + style.filled: true + } +} +a.6 <-> b.6: cf-many { + source-arrowhead.shape: cf-many + target-arrowhead.shape: cf-many +} +a.7 <-> b.7: cf-many-required { + source-arrowhead.shape: cf-many-required + target-arrowhead.shape: cf-many-required +} +a.8 <-> b.8: cf-one { + source-arrowhead.shape: cf-one + target-arrowhead.shape: cf-one +} +a.9 <-> b.9: cf-one-required { + source-arrowhead.shape: cf-one-required + target-arrowhead.shape: cf-one-required +} `, }, } diff --git a/d2renderers/d2sketch/testdata/arrowheads/sketch.exp.svg b/d2renderers/d2sketch/testdata/arrowheads/sketch.exp.svg new file mode 100644 index 000000000..c743e309d --- /dev/null +++ b/d2renderers/d2sketch/testdata/arrowheads/sketch.exp.svg @@ -0,0 +1,87 @@ + + + + + + +ab00112233445566778899 <->-- arrowtriangle diamond diamond filled cf-many cf-many-required cf-one cf-one-required + + + + + + + + + + + + \ No newline at end of file