branch: externals/phps-mode commit c2db7d39f2504c7415dcd7e264d6f6b48bfe7487 Author: Christian Johansson <christ...@cvj.se> Commit: Christian Johansson <christ...@cvj.se>
Preparations for integration test --- Makefile | 8 +++++-- phps-mode-lexer.el | 2 +- phps-mode-test-integration.el | 50 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 43a21c1..a1bdea5 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ ELC := $(EL:.el=.elc) clean: rm -f $(ELC) -.PHONE: compile +.PHONY: compile compile: $(ELC) @@ -19,12 +19,16 @@ compile: $(EMACS_CMD) -f batch-byte-compile $< .PHONY: tests -tests: clean test-functions test-lexer test-parser +tests: clean test-functions test-lexer test-parser test-integration .PHONY: test-functions test-functions: $(EMACS_CMD) -l phps-mode-test-functions.el +.PHONY: test-integration +test-integration: + $(EMACS_CMD) -l phps-mode-test-integration.el + .PHONY: test-lexer test-lexer: $(EMACS_CMD) -l phps-mode-test-lexer.el diff --git a/phps-mode-lexer.el b/phps-mode-lexer.el index 971dc77..c52df42 100644 --- a/phps-mode-lexer.el +++ b/phps-mode-lexer.el @@ -1185,7 +1185,7 @@ ANY_CHAR' ((looking-at (concat phps-mode-lexer-LABEL "[\\[}]")) (let ((start (match-beginning 0)) (end (- (match-end 0) 1))) - (message "Stopped here") + ;; (message "Stopped here") (phps-mode-lexer-yy_pop_state) (phps-mode-lexer-yy_push_state phps-mode-lexer-ST_IN_SCRIPTING) (phps-mode-lexer-RETURN_TOKEN 'T_STRING_VARNAME start end))) diff --git a/phps-mode-test-integration.el b/phps-mode-test-integration.el new file mode 100644 index 0000000..662526e --- /dev/null +++ b/phps-mode-test-integration.el @@ -0,0 +1,50 @@ +;;; phps-mode-test-integration.el --- Tests for integration -*- lexical-binding: t -*- + +;; Copyright (C) 2019 Christian Johansson + +;; This file is not part of GNU Emacs. + +;; This program is free software; you can redistribute it and/or +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation; either version 2, or (at +;; your option) any later version. + +;; This program is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Spathoftware Foundation, Inc., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + + +;;; Commentary: + + +;; Run from terminal make test-integration + + +;;; Code: + + +(autoload 'phps-mode-test-with-buffer "phps-mode-test") +(autoload 'phps-mode-functions-verbose "phps-mode-functions") +(autoload 'phps-mode-functions-indent-line "phps-mode-functions") +(autoload 'phps-mode-functions-get-lines-indent "phps-mode-functions") +(autoload 'should "ert") + +(defun phps-mode-test-integration () + "Run test for integration." + ;; (setq debug-on-error t) + ;; (setq phps-mode-functions-verbose t) + + (message "Integration tests here") +) + +(phps-mode-test-integration) + +(provide 'phps-mode-test-integration) + +;;; phps-mode-test-integration.el ends here