Codebase list yaml-mode / a00de52
Add remaining highlighting tests Vasilij Schneidermann 1 year, 6 months ago
1 changed file(s) with 33 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
125125
126126 ;;; Regression tests:
127127
128 (ert-deftest highlighting/string-syntax ()
129 "Highlighting of string syntax.
130 Detail: https://github.com/yoshiki/yaml-mode/issues/75
131 PR: https://github.com/yoshiki/yaml-mode/pull/76"
132 (yaml-test-font-lock "«some's'strings'some's'nots»:
133 - here: «syntax is not string»
134 - this: «'is a string with \"quotes\"'»
135 - and: «'to express one single quote, use '' two of them'»
136 - finally: «syntax is not string»
137 - singlequotedoesntfreeze: '
138 "
139 '(font-lock-variable-name-face
140 nil
141 font-lock-string-face
142 font-lock-string-face
143 nil)))
144
145 (ert-deftest highlighting/list-of-dicts-containing-literal-block ()
146 "Highlighting literal blocks in list of dicts.
147 PR: https://github.com/yoshiki/yaml-mode/pull/81"
148 (yaml-test-font-lock "example:
149 - key1: «Correctly propertized»
150 key2: |
151 «Correctly propertized.»
152 - key3: |
153 «Correctly propertized»
154 key4: «Incorrectly propertized as part of preceding yaml-literal-block»
155 "
156 '(nil
157 font-lock-string-face
158 font-lock-string-face
159 nil)))
160
128161 (ert-deftest highlighting/constant-before-comment ()
129162 "Highlighting constant before comment.
130163 Detail: https://github.com/yoshiki/yaml-mode/issues/96"