emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/lua-mode ceb575b 374/468: tests: break down function heade


From: Philip Kaludercic
Subject: [nongnu] elpa/lua-mode ceb575b 374/468: tests: break down function header tests into separate cases
Date: Thu, 5 Aug 2021 04:59:12 -0400 (EDT)

branch: elpa/lua-mode
commit ceb575baa5e1135ef03061afe054450ee0e9a438
Author: immerrr <immerrr+lua@gmail.com>
Commit: immerrr <immerrr+lua@gmail.com>

    tests: break down function header tests into separate cases
---
 test/test-font-lock.el | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/test/test-font-lock.el b/test/test-font-lock.el
index b89037d..f30b1fc 100644
--- a/test/test-font-lock.el
+++ b/test/test-font-lock.el
@@ -81,7 +81,20 @@ _table.sort(foobar)
 
 
 (describe "Fontification of function headers"
-  (it "fontifies simple headers"
+  (it "fontifies function <name>(...) headers"
+    (expect "function bar() end"
+            :to-be-fontified-as '(("function" keyword "bar" function-name 
"end" keyword))))
+  (it "fontifies local function <name>(...) headers"
+    (expect "local function baz() end"
+            :to-be-fontified-as '(("local" keyword "function" keyword "baz" 
function-name "end" keyword))))
+  (it "fontifies <name> = function (...) headers"
+    (expect "qux = function() end"
+            :to-be-fontified-as '(("qux" function-name "function" keyword 
"end" keyword))))
+  (it "fontifies local <name> = function (...) headers"
+    (expect "local quux = function() end"
+            :to-be-fontified-as '(("local" keyword "quux" function-name 
"function" keyword "end" keyword))))
+
+  (it "fontifies different variations of headers altogether"
     (expect
      ;; Check all defun variants, check embedded defuns
      "\



reply via email to

[Prev in Thread] Current Thread [Next in Thread]