Skip to content

Commit 0d71b39

Browse files
committed
Test that 'role' is only fontified after 'type'
1 parent 71e5a23 commit 0d71b39

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/haskell-font-lock-tests.el

+8-1
Original file line numberDiff line numberDiff line change
@@ -556,9 +556,16 @@ if all of its characters have syntax and face. See
556556
'literate))
557557

558558
(ert-deftest haskell-type-role ()
559-
"fontify \"role\" after \"type\""
559+
"Fontify \"role\" after \"type\""
560560
(check-properties
561561
'("type role Ptr representational")
562562
'(("type" "w" haskell-keyword-face)
563563
("role" "w" haskell-keyword-face)
564564
("Ptr" "w" haskell-constructor-face))))
565+
566+
(ert-deftest haskell-no-type-role ()
567+
"Don't fontify \"role\" when not after \"type\""
568+
(check-properties
569+
'("foo role = 3")
570+
'(("foo" "w" haskell-definition-face)
571+
("role" "w" nil))))

0 commit comments

Comments
 (0)