diff --git a/tests/testthat/_snaps/draw-keys/rotated-rich-text-keys.svg b/tests/testthat/_snaps/draw-keys/rotated-rich-text-keys.svg
new file mode 100644
index 0000000..ef93642
--- /dev/null
+++ b/tests/testthat/_snaps/draw-keys/rotated-rich-text-keys.svg
@@ -0,0 +1,221 @@
+
+
diff --git a/tests/testthat/test-draw-keys.R b/tests/testthat/test-draw-keys.R
new file mode 100644
index 0000000..1366b6d
--- /dev/null
+++ b/tests/testthat/test-draw-keys.R
@@ -0,0 +1,18 @@
+test_that("visual test", {
+ skip_if_not(packageVersion("ggplot2") >= "3.5.0")
+
+ p <- ggplot(iris, aes(Sepal.Width, Sepal.Length, colour = Species)) +
+ geom_point(key_glyph = "richtext") +
+ scale_colour_discrete(
+ labels = NULL,
+ guide = guide_legend(override.aes = list(
+ label = paste0(
+ "Iris",
+ c("
setosa", " versicolor", "
virginica"), ""
+ ),
+ size = 11 / .pt, hjust = c(1, 0.5, 0), angle = c(-45, 0, 45),
+ label.colour = "blue"
+ ))
+ )
+ expect_doppelganger("Rotated rich text keys", p)
+})