You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
phpinspect.el/test/util/generate-test-data.el

14 lines
475 B
EmacsLisp

(require 'phpinspect)
(let ((here (file-name-directory
(or load-file-name
buffer-file-name))))
(dolist (file (directory-files (concat here "/../fixtures" ) t "\\.php$"))
(with-temp-buffer
(insert-file-contents-literally file)
(let ((result (phpinspect-parse-current-buffer)))
(with-temp-buffer
(insert (prin1-to-string result))
(write-file (concat (string-remove-suffix ".php" file) ".el")))))))