@@ -299,6 +299,55 @@ when"
299299 (should-not (eq (elixir-test-face-at 17 ) 'font-lock-comment-face ))
300300 (should-not (eq (elixir-test-face-at 25 ) 'font-lock-comment-face ))))
301301
302+ (ert-deftest elixir-mode-syntax-table/quotes-in-sigils ()
303+ " https://github.com/elixir-lang/emacs-elixir/issues/265"
304+ :tags '(fontification syntax-table)
305+ (elixir-test-with-temp-buffer
306+ " ~s/\" /
307+ ~r|'|
308+ ~c\" '\"
309+ ~w'\" '
310+ ~s(\" )
311+ ~r[\" ]
312+ ~c{\" }
313+ ~w<\" >
314+ ~s\"\"\"
315+ foo
316+ \"\"\" "
317+ (should-not (eq (elixir-test-face-at 5 ) 'font-lock-string-face )) ; ~s//
318+
319+ (should-not (eq (elixir-test-face-at 7 ) 'font-lock-string-face )) ; ~r||
320+ (should (eq (elixir-test-face-at 7 ) 'font-lock-builtin-face ))
321+ (should-not (eq (elixir-test-face-at 11 ) 'font-lock-string-face ))
322+
323+ (should-not (eq (elixir-test-face-at 13 ) 'font-lock-string-face )) ; ~c""
324+ (should (eq (elixir-test-face-at 13 ) 'font-lock-builtin-face ))
325+ (should-not (eq (elixir-test-face-at 17 ) 'font-lock-string-face ))
326+
327+ (should-not (eq (elixir-test-face-at 19 ) 'font-lock-string-face )) ; ~w''
328+ (should (eq (elixir-test-face-at 19 ) 'font-lock-builtin-face ))
329+ (should-not (eq (elixir-test-face-at 23 ) 'font-lock-string-face ))
330+
331+ (should-not (eq (elixir-test-face-at 25 ) 'font-lock-string-face )) ; ~s()
332+ (should-not (eq (elixir-test-face-at 29 ) 'font-lock-string-face ))
333+
334+ (should-not (eq (elixir-test-face-at 31 ) 'font-lock-string-face )) ; ~r[]
335+ (should (eq (elixir-test-face-at 31 ) 'font-lock-builtin-face ))
336+ (should-not (eq (elixir-test-face-at 35 ) 'font-lock-string-face ))
337+
338+ (should-not (eq (elixir-test-face-at 37 ) 'font-lock-string-face )) ; ~c{}
339+ (should (eq (elixir-test-face-at 37 ) 'font-lock-builtin-face ))
340+ (should-not (eq (elixir-test-face-at 41 ) 'font-lock-string-face ))
341+
342+ (should-not (eq (elixir-test-face-at 43 ) 'font-lock-string-face )) ; ~w<>
343+ (should (eq (elixir-test-face-at 43 ) 'font-lock-builtin-face ))
344+ (should-not (eq (elixir-test-face-at 47 ) 'font-lock-string-face ))
345+
346+ (should (eq (elixir-test-face-at 51 ) 'font-lock-string-face )) ; ~s""" """
347+ (should (eq (elixir-test-face-at 52 ) 'font-lock-string-face ))
348+ (should (eq (elixir-test-face-at 53 ) 'font-lock-string-face ))
349+ (should (eq (elixir-test-face-at 55 ) 'font-lock-string-face ))))
350+
302351(provide 'elixir-mode-font-test )
303352
304353; ;; elixir-mode-font-test.el ends here
0 commit comments