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

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

[elpa] externals/phps-mode d095e757e6 186/212: Added failing imenu test


From: Christian Johansson
Subject: [elpa] externals/phps-mode d095e757e6 186/212: Added failing imenu test
Date: Wed, 26 Jan 2022 01:51:25 -0500 (EST)

branch: externals/phps-mode
commit d095e757e6191b8fc67ea688b4b44ca7adc14544
Author: Christian Johansson <christian@cvj.se>
Commit: Christian Johansson <christian@cvj.se>

    Added failing imenu test
---
 test/phps-mode-test-ast.el | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/test/phps-mode-test-ast.el b/test/phps-mode-test-ast.el
index 02b5e1048e..b6f147fee4 100644
--- a/test/phps-mode-test-ast.el
+++ b/test/phps-mode-test-ast.el
@@ -233,6 +233,18 @@
        phps-mode-ast-imenu--index
        nil))))
 
+  ;; TODO Make this test pass
+  (phps-mode-test-ast--buffer-contents
+   "<?php\n\nnamespace myNamespace;\n\nif (!function_exists('myFunction')) {\n 
   function myFunction() {\n        if (!class_exists('myClassA')) {\n          
  class myClassA {\n                public function myMethodA()\n               
 {\n                    \n                }\n            }\n        }\n    
}\n}\n\nif (!class_exists('myClassB')) {\n    class myClassB\n    {\n        
function myMethodB()\n        {\n        }\n    }\n}"
+   "Imenu for conditionally declared function and class"
+   (lambda()
+     (phps-mode-ast--generate)
+     (phps-mode-ast-imenu--generate)
+     (should
+      (equal
+       phps-mode-ast-imenu--index
+       '(("myNamespace" ("myFunction" . 183) ("myClassA" ("myMethodA" . 200)) 
("myClassB" . ("myMethodB" . 377))))))))
+
   (message "\n-- Ran tests for imenu generation. --"))
 
 (defun phps-mode-test-ast-bookkeeping ()



reply via email to

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