From 5dbb55c92c0fa91494dbddbacdedb095daeada1a Mon Sep 17 00:00:00 2001 From: USAMI Kenta Date: Sun, 12 May 2019 20:36:01 +0900 Subject: [PATCH] Clean up the buffer state for each condition --- php-mode-test.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/php-mode-test.el b/php-mode-test.el index 1dba70cf..13401962 100644 --- a/php-mode-test.el +++ b/php-mode-test.el @@ -268,11 +268,11 @@ an error." (ert-deftest php-mode-test-issue-53 () "Check if whitespace effects are undone when changing coding style from Drupal." - (with-php-mode-test ("issue-53.php") - (search-forward "return $this->bar;") + (dolist (mode '(pear wordpress symfony2)) ;; the file written to has no significance, only the buffer (let ((tmp-filename (concat (make-temp-name temporary-file-directory) ".php"))) - (dolist (mode '(pear wordpress symfony2)) + (with-php-mode-test ("issue-53.php") + (search-forward "return $this->bar;") (php-set-style "drupal") (php-set-style (symbol-name mode)) (should (equal (list "drupal" mode nil) @@ -283,9 +283,9 @@ style from Drupal." (list "psr2" mode show-trailing-whitespace))) (php-set-style "drupal") + (should (equal (list "drupal-2" mode t) + (list "drupal-2" mode show-trailing-whitespace))) (write-file tmp-filename) - (should (equal (list "drupal-after-write" mode t) - (list "drupal-after-write" mode show-trailing-whitespace))) (should (looking-at-p "$")))))) (ert-deftest php-mode-test-issue-73 ()