diff --git a/tests/anchor-centroid/ref/1.png b/tests/anchor/centroid/ref/1.png similarity index 100% rename from tests/anchor-centroid/ref/1.png rename to tests/anchor/centroid/ref/1.png diff --git a/tests/anchor-centroid/test.typ b/tests/anchor/centroid/test.typ similarity index 100% rename from tests/anchor-centroid/test.typ rename to tests/anchor/centroid/test.typ diff --git a/tests/local-anchor/ref/1.png b/tests/anchor/local/ref/1.png similarity index 100% rename from tests/local-anchor/ref/1.png rename to tests/anchor/local/ref/1.png diff --git a/tests/local-anchor/test.typ b/tests/anchor/local/test.typ similarity index 100% rename from tests/local-anchor/test.typ rename to tests/anchor/local/test.typ diff --git a/tests/arc-previous-position/ref/1.png b/tests/arc/previous/position/ref/1.png similarity index 100% rename from tests/arc-previous-position/ref/1.png rename to tests/arc/previous/position/ref/1.png diff --git a/tests/arc-previous-position/test.typ b/tests/arc/previous/position/test.typ similarity index 100% rename from tests/arc-previous-position/test.typ rename to tests/arc/previous/position/test.typ diff --git a/tests/arc-through/ref/1.png b/tests/arc/through/ref/1.png similarity index 100% rename from tests/arc-through/ref/1.png rename to tests/arc/through/ref/1.png diff --git a/tests/arc-through/test.typ b/tests/arc/through/test.typ similarity index 100% rename from tests/arc-through/test.typ rename to tests/arc/through/test.typ diff --git a/tests/bezier/ref/1.png b/tests/bezier/base/ref/1.png similarity index 100% rename from tests/bezier/ref/1.png rename to tests/bezier/base/ref/1.png diff --git a/tests/bezier/test.typ b/tests/bezier/base/test.typ similarity index 100% rename from tests/bezier/test.typ rename to tests/bezier/base/test.typ diff --git a/tests/bezier-shortening/ref/1.png b/tests/bezier/shortening/ref/1.png similarity index 100% rename from tests/bezier-shortening/ref/1.png rename to tests/bezier/shortening/ref/1.png diff --git a/tests/bezier-shortening/test.typ b/tests/bezier/shortening/test.typ similarity index 100% rename from tests/bezier-shortening/test.typ rename to tests/bezier/shortening/test.typ diff --git a/tests/bezier-through/ref/1.png b/tests/bezier/through/ref/1.png similarity index 100% rename from tests/bezier-through/ref/1.png rename to tests/bezier/through/ref/1.png diff --git a/tests/bezier-through/test.typ b/tests/bezier/through/test.typ similarity index 100% rename from tests/bezier-through/test.typ rename to tests/bezier/through/test.typ diff --git a/tests/circle/ref/1.png b/tests/circle/base/ref/1.png similarity index 100% rename from tests/circle/ref/1.png rename to tests/circle/base/ref/1.png diff --git a/tests/circle/test.typ b/tests/circle/base/test.typ similarity index 100% rename from tests/circle/test.typ rename to tests/circle/base/test.typ diff --git a/tests/circle-through/ref/1.png b/tests/circle/through/ref/1.png similarity index 100% rename from tests/circle-through/ref/1.png rename to tests/circle/through/ref/1.png diff --git a/tests/circle-through/test.typ b/tests/circle/through/test.typ similarity index 100% rename from tests/circle-through/test.typ rename to tests/circle/through/test.typ diff --git a/tests/copy-anchor/ref/1.png b/tests/copy/anchor/ref/1.png similarity index 100% rename from tests/copy-anchor/ref/1.png rename to tests/copy/anchor/ref/1.png diff --git a/tests/copy-anchor/test.typ b/tests/copy/anchor/test.typ similarity index 100% rename from tests/copy-anchor/test.typ rename to tests/copy/anchor/test.typ diff --git a/tests/custom-mark/ref/1.png b/tests/custom/mark/ref/1.png similarity index 100% rename from tests/custom-mark/ref/1.png rename to tests/custom/mark/ref/1.png diff --git a/tests/custom-mark/test.typ b/tests/custom/mark/test.typ similarity index 100% rename from tests/custom-mark/test.typ rename to tests/custom/mark/test.typ diff --git a/tests/element-anchors/ref.png b/tests/element/anchors/ref.png similarity index 100% rename from tests/element-anchors/ref.png rename to tests/element/anchors/ref.png diff --git a/tests/element-anchors/ref/1.png b/tests/element/anchors/ref/1.png similarity index 100% rename from tests/element-anchors/ref/1.png rename to tests/element/anchors/ref/1.png diff --git a/tests/element-anchors/test.typ b/tests/element/anchors/test.typ similarity index 100% rename from tests/element-anchors/test.typ rename to tests/element/anchors/test.typ diff --git a/tests/empty-group/ref/1.png b/tests/empty/base/ref/1.png similarity index 100% rename from tests/empty-group/ref/1.png rename to tests/empty/base/ref/1.png diff --git a/tests/empty/test.typ b/tests/empty/base/test.typ similarity index 100% rename from tests/empty/test.typ rename to tests/empty/base/test.typ diff --git a/tests/empty/ref/1.png b/tests/empty/group/ref/1.png similarity index 100% rename from tests/empty/ref/1.png rename to tests/empty/group/ref/1.png diff --git a/tests/empty-group/test.typ b/tests/empty/group/test.typ similarity index 100% rename from tests/empty-group/test.typ rename to tests/empty/group/test.typ diff --git a/tests/group-anchors/ref/1.png b/tests/group/anchors/ref/1.png similarity index 100% rename from tests/group-anchors/ref/1.png rename to tests/group/anchors/ref/1.png diff --git a/tests/group-anchors/test.typ b/tests/group/anchors/test.typ similarity index 100% rename from tests/group-anchors/test.typ rename to tests/group/anchors/test.typ diff --git a/tests/group-nested-anchors/ref/1.png b/tests/group/nested/anchors/ref/1.png similarity index 100% rename from tests/group-nested-anchors/ref/1.png rename to tests/group/nested/anchors/ref/1.png diff --git a/tests/group-nested-anchors/test.typ b/tests/group/nested/anchors/test.typ similarity index 100% rename from tests/group-nested-anchors/test.typ rename to tests/group/nested/anchors/test.typ diff --git a/tests/group-none/ref.png b/tests/group/none/ref.png similarity index 100% rename from tests/group-none/ref.png rename to tests/group/none/ref.png diff --git a/tests/group-none/ref/1.png b/tests/group/none/ref/1.png similarity index 100% rename from tests/group-none/ref/1.png rename to tests/group/none/ref/1.png diff --git a/tests/group-none/test.typ b/tests/group/none/test.typ similarity index 100% rename from tests/group-none/test.typ rename to tests/group/none/test.typ diff --git a/tests/group-padding/ref/1.png b/tests/group/padding/ref/1.png similarity index 100% rename from tests/group-padding/ref/1.png rename to tests/group/padding/ref/1.png diff --git a/tests/group-padding/test.typ b/tests/group/padding/test.typ similarity index 100% rename from tests/group-padding/test.typ rename to tests/group/padding/test.typ diff --git a/tests/group-transform/ref/1.png b/tests/group/transform/ref/1.png similarity index 100% rename from tests/group-transform/ref/1.png rename to tests/group/transform/ref/1.png diff --git a/tests/group-transform/test.typ b/tests/group/transform/test.typ similarity index 100% rename from tests/group-transform/test.typ rename to tests/group/transform/test.typ diff --git a/tests/group-translate/ref/1.png b/tests/group/translate/ref/1.png similarity index 100% rename from tests/group-translate/ref/1.png rename to tests/group/translate/ref/1.png diff --git a/tests/group-translate/test.typ b/tests/group/translate/test.typ similarity index 100% rename from tests/group-translate/test.typ rename to tests/group/translate/test.typ diff --git a/tests/line-element-element-intersection/ref.png b/tests/line/element/element/intersection/ref.png similarity index 100% rename from tests/line-element-element-intersection/ref.png rename to tests/line/element/element/intersection/ref.png diff --git a/tests/line-element-element-intersection/ref/1.png b/tests/line/element/element/intersection/ref/1.png similarity index 100% rename from tests/line-element-element-intersection/ref/1.png rename to tests/line/element/element/intersection/ref/1.png diff --git a/tests/line-element-element-intersection/test.typ b/tests/line/element/element/intersection/test.typ similarity index 100% rename from tests/line-element-element-intersection/test.typ rename to tests/line/element/element/intersection/test.typ diff --git a/tests/line-fill-rule/ref/1.png b/tests/line/fill/rule/ref/1.png similarity index 100% rename from tests/line-fill-rule/ref/1.png rename to tests/line/fill/rule/ref/1.png diff --git a/tests/line-fill-rule/test.typ b/tests/line/fill/rule/test.typ similarity index 100% rename from tests/line-fill-rule/test.typ rename to tests/line/fill/rule/test.typ diff --git a/tests/mark-anchors/ref/1.png b/tests/mark/anchors/ref/1.png similarity index 100% rename from tests/mark-anchors/ref/1.png rename to tests/mark/anchors/ref/1.png diff --git a/tests/mark-anchors/test.typ b/tests/mark/anchors/test.typ similarity index 100% rename from tests/mark-anchors/test.typ rename to tests/mark/anchors/test.typ diff --git a/tests/mark-auto-offset/ref/1.png b/tests/mark/auto/offset/ref/1.png similarity index 100% rename from tests/mark-auto-offset/ref/1.png rename to tests/mark/auto/offset/ref/1.png diff --git a/tests/mark-auto-offset/test.typ b/tests/mark/auto/offset/test.typ similarity index 100% rename from tests/mark-auto-offset/test.typ rename to tests/mark/auto/offset/test.typ diff --git a/tests/mark-position/ref/1.png b/tests/mark/position/ref/1.png similarity index 100% rename from tests/mark-position/ref/1.png rename to tests/mark/position/ref/1.png diff --git a/tests/mark-position/test.typ b/tests/mark/position/test.typ similarity index 100% rename from tests/mark-position/test.typ rename to tests/mark/position/test.typ diff --git a/tests/mark-shape-transform/ref/1.png b/tests/mark/shape/transform/ref/1.png similarity index 100% rename from tests/mark-shape-transform/ref/1.png rename to tests/mark/shape/transform/ref/1.png diff --git a/tests/mark-shape-transform/test.typ b/tests/mark/shape/transform/test.typ similarity index 100% rename from tests/mark-shape-transform/test.typ rename to tests/mark/shape/transform/test.typ diff --git a/tests/mark-single/ref.png b/tests/mark/single/ref.png similarity index 100% rename from tests/mark-single/ref.png rename to tests/mark/single/ref.png diff --git a/tests/mark-single/ref/1.png b/tests/mark/single/ref/1.png similarity index 100% rename from tests/mark-single/ref/1.png rename to tests/mark/single/ref/1.png diff --git a/tests/mark-single/test.typ b/tests/mark/single/test.typ similarity index 100% rename from tests/mark-single/test.typ rename to tests/mark/single/test.typ diff --git a/tests/mark-z-axis/ref/1.png b/tests/mark/z/axis/ref/1.png similarity index 100% rename from tests/mark-z-axis/ref/1.png rename to tests/mark/z/axis/ref/1.png diff --git a/tests/mark-z-axis/test.typ b/tests/mark/z/axis/test.typ similarity index 100% rename from tests/mark-z-axis/test.typ rename to tests/mark/z/axis/test.typ diff --git a/tests/multiple-marks/ref/1.png b/tests/multiple/marks/ref/1.png similarity index 100% rename from tests/multiple-marks/ref/1.png rename to tests/multiple/marks/ref/1.png diff --git a/tests/multiple-marks/test.typ b/tests/multiple/marks/test.typ similarity index 100% rename from tests/multiple-marks/test.typ rename to tests/multiple/marks/test.typ diff --git a/tests/path-anchors/ref.png b/tests/path/anchors/ref.png similarity index 100% rename from tests/path-anchors/ref.png rename to tests/path/anchors/ref.png diff --git a/tests/path-anchors/ref/1.png b/tests/path/anchors/ref/1.png similarity index 100% rename from tests/path-anchors/ref/1.png rename to tests/path/anchors/ref/1.png diff --git a/tests/path-anchors/test.typ b/tests/path/anchors/test.typ similarity index 100% rename from tests/path-anchors/test.typ rename to tests/path/anchors/test.typ diff --git a/tests/path-decoration/ref/1.png b/tests/path/decoration/ref/1.png similarity index 100% rename from tests/path-decoration/ref/1.png rename to tests/path/decoration/ref/1.png diff --git a/tests/path-decoration/test.typ b/tests/path/decoration/test.typ similarity index 100% rename from tests/path-decoration/test.typ rename to tests/path/decoration/test.typ diff --git a/tests/projection-default/ref/1.png b/tests/projection/default/ref/1.png similarity index 100% rename from tests/projection-default/ref/1.png rename to tests/projection/default/ref/1.png diff --git a/tests/projection-default/test.typ b/tests/projection/default/test.typ similarity index 100% rename from tests/projection-default/test.typ rename to tests/projection/default/test.typ diff --git a/tests/projection-ortho/ref/1.png b/tests/projection/ortho/ref/1.png similarity index 100% rename from tests/projection-ortho/ref/1.png rename to tests/projection/ortho/ref/1.png diff --git a/tests/projection-ortho/test.typ b/tests/projection/ortho/test.typ similarity index 100% rename from tests/projection-ortho/test.typ rename to tests/projection/ortho/test.typ diff --git a/tests/rect-around/ref/1.png b/tests/rect/around/base/ref/1.png similarity index 100% rename from tests/rect-around/ref/1.png rename to tests/rect/around/base/ref/1.png diff --git a/tests/rect-around/test.typ b/tests/rect/around/base/test.typ similarity index 100% rename from tests/rect-around/test.typ rename to tests/rect/around/base/test.typ diff --git a/tests/rect-around-padded/ref/1.png b/tests/rect/around/padded/ref/1.png similarity index 100% rename from tests/rect-around-padded/ref/1.png rename to tests/rect/around/padded/ref/1.png diff --git a/tests/rect-around-padded/test.typ b/tests/rect/around/padded/test.typ similarity index 100% rename from tests/rect-around-padded/test.typ rename to tests/rect/around/padded/test.typ diff --git a/tests/rect/ref/1.png b/tests/rect/base/ref/1.png similarity index 100% rename from tests/rect/ref/1.png rename to tests/rect/base/ref/1.png diff --git a/tests/rect/test.typ b/tests/rect/base/test.typ similarity index 100% rename from tests/rect/test.typ rename to tests/rect/base/test.typ diff --git a/tests/rect-rounded/ref/1.png b/tests/rect/rounded/ref/1.png similarity index 100% rename from tests/rect-rounded/ref/1.png rename to tests/rect/rounded/ref/1.png diff --git a/tests/rect-rounded/test.typ b/tests/rect/rounded/test.typ similarity index 100% rename from tests/rect-rounded/test.typ rename to tests/rect/rounded/test.typ diff --git a/tests/relative-length/ref/1.png b/tests/relative/length/ref/1.png similarity index 100% rename from tests/relative-length/ref/1.png rename to tests/relative/length/ref/1.png diff --git a/tests/relative-length/test.typ b/tests/relative/length/test.typ similarity index 100% rename from tests/relative-length/test.typ rename to tests/relative/length/test.typ diff --git a/tests/relative-no-update/ref/1.png b/tests/relative/no/update/ref/1.png similarity index 100% rename from tests/relative-no-update/ref/1.png rename to tests/relative/no/update/ref/1.png diff --git a/tests/relative-no-update/test.typ b/tests/relative/no/update/test.typ similarity index 100% rename from tests/relative-no-update/test.typ rename to tests/relative/no/update/test.typ diff --git a/tests/right-angle/ref/1.png b/tests/right/angle/ref/1.png similarity index 100% rename from tests/right-angle/ref/1.png rename to tests/right/angle/ref/1.png diff --git a/tests/right-angle/test.typ b/tests/right/angle/test.typ similarity index 100% rename from tests/right-angle/test.typ rename to tests/right/angle/test.typ diff --git a/tests/root-anchor/ref/1.png b/tests/root/anchor/ref/1.png similarity index 100% rename from tests/root-anchor/ref/1.png rename to tests/root/anchor/ref/1.png diff --git a/tests/root-anchor/test.typ b/tests/root/anchor/test.typ similarity index 100% rename from tests/root-anchor/test.typ rename to tests/root/anchor/test.typ diff --git a/tests/rotate-around/ref/1.png b/tests/rotate/around/ref/1.png similarity index 100% rename from tests/rotate-around/ref/1.png rename to tests/rotate/around/ref/1.png diff --git a/tests/rotate-around/test.typ b/tests/rotate/around/test.typ similarity index 100% rename from tests/rotate-around/test.typ rename to tests/rotate/around/test.typ diff --git a/tests/set-get-ctx/ref/1.png b/tests/set/get/ctx/ref/1.png similarity index 100% rename from tests/set-get-ctx/ref/1.png rename to tests/set/get/ctx/ref/1.png diff --git a/tests/set-get-ctx/test.typ b/tests/set/get/ctx/test.typ similarity index 100% rename from tests/set-get-ctx/test.typ rename to tests/set/get/ctx/test.typ diff --git a/tests/style/inheritance/self/ref/1.png b/tests/style/inheritance/self/ref/1.png deleted file mode 100644 index e1bc51415..000000000 Binary files a/tests/style/inheritance/self/ref/1.png and /dev/null differ diff --git a/tests/style/inheritance/self/test.typ b/tests/style/inheritance/self/test.typ deleted file mode 100644 index b0f250885..000000000 --- a/tests/style/inheritance/self/test.typ +++ /dev/null @@ -1,56 +0,0 @@ -#set page(width: auto, height: auto) -#import "/src/lib.typ": * -#import "/tests/helper.typ": * - -#test-case({ - import draw: * - - let next(body) = { - translate((0,-.2,0)) - group(body) - } - - next({ - line((0,0), (1,0)) - }) - next({ - set-style(stroke: blue) - line((0,0), (1,0)) - }) - next({ - line((0,0), (1,0), stroke: blue) - }) - next({ - // Blue arrow - set-style(stroke: blue) - line((0,0), (1,0), mark: (end: ">")) - }) - next({ - // Blue arrow - line((0,0), (1,0), mark: (end: ">"), stroke: blue) - }) - next({ - // Blue + Green arrow head - line((0,0), (1,0), mark: (end: ">", stroke: green), stroke: blue) - }) - next({ - // Blue + Yellow arrow head - set-style(mark: (stroke: yellow)) - line((0,0), (1,0), mark: (end: ">"), stroke: blue) - }) - next({ - // Blue + Green arrow head - set-style(mark: (stroke: yellow), stroke: red) - line((0,0), (1,0), mark: (end: ">", stroke: green), stroke: blue) - }) - next({ - // Blue + Yellow/Green arrow head - set-style(mark: (stroke: yellow, fill: auto), stroke: blue, fill: blue) - line((0,0), (1,0), mark: (end: ">"), fill: green, stroke: green) - }) - next({ - // Blue arrow - set-style(stroke: red) - line((0,0), (1,0), mark: (end: ">"), stroke: blue) - }) -}) diff --git a/tests/style/inheritance/base/test.typ b/tests/style/inheritance/test.typ similarity index 60% rename from tests/style/inheritance/base/test.typ rename to tests/style/inheritance/test.typ index 8f065e165..97cbb998e 100644 --- a/tests/style/inheritance/base/test.typ +++ b/tests/style/inheritance/test.typ @@ -69,3 +69,56 @@ set-style(stroke: "wrong-value") assert-style-eq("stroke", "base", root: "my-root", base: (stroke: "base")) }) + +#test-case({ + import draw: * + + let next(body) = { + translate((0,-.2,0)) + group(body) + } + + next({ + line((0,0), (1,0)) + }) + next({ + set-style(stroke: blue) + line((0,0), (1,0)) + }) + next({ + line((0,0), (1,0), stroke: blue) + }) + next({ + // Blue arrow + set-style(stroke: blue) + line((0,0), (1,0), mark: (end: ">")) + }) + next({ + // Blue arrow + line((0,0), (1,0), mark: (end: ">"), stroke: blue) + }) + next({ + // Blue + Green arrow head + line((0,0), (1,0), mark: (end: ">", stroke: green), stroke: blue) + }) + next({ + // Blue + Yellow arrow head + set-style(mark: (stroke: yellow)) + line((0,0), (1,0), mark: (end: ">"), stroke: blue) + }) + next({ + // Blue + Green arrow head + set-style(mark: (stroke: yellow), stroke: red) + line((0,0), (1,0), mark: (end: ">", stroke: green), stroke: blue) + }) + next({ + // Blue + Yellow/Green arrow head + set-style(mark: (stroke: yellow, fill: auto), stroke: blue, fill: blue) + line((0,0), (1,0), mark: (end: ">"), fill: green, stroke: green) + }) + next({ + // Blue arrow + set-style(stroke: red) + line((0,0), (1,0), mark: (end: ">"), stroke: blue) + }) +}) diff --git a/tests/transform-precission/ref/1.png b/tests/transform/precission/ref/1.png similarity index 100% rename from tests/transform-precission/ref/1.png rename to tests/transform/precission/ref/1.png diff --git a/tests/transform-precission/test.typ b/tests/transform/precission/test.typ similarity index 100% rename from tests/transform-precission/test.typ rename to tests/transform/precission/test.typ