Skip to content

Commit 5dbb55c

Browse files
committed
Clean up the buffer state for each condition
1 parent a43be72 commit 5dbb55c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

php-mode-test.el

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -268,11 +268,11 @@ an error."
268268
(ert-deftest php-mode-test-issue-53 ()
269269
"Check if whitespace effects are undone when changing coding
270270
style from Drupal."
271-
(with-php-mode-test ("issue-53.php")
272-
(search-forward "return $this->bar;")
271+
(dolist (mode '(pear wordpress symfony2))
273272
;; the file written to has no significance, only the buffer
274273
(let ((tmp-filename (concat (make-temp-name temporary-file-directory) ".php")))
275-
(dolist (mode '(pear wordpress symfony2))
274+
(with-php-mode-test ("issue-53.php")
275+
(search-forward "return $this->bar;")
276276
(php-set-style "drupal")
277277
(php-set-style (symbol-name mode))
278278
(should (equal (list "drupal" mode nil)
@@ -283,9 +283,9 @@ style from Drupal."
283283
(list "psr2" mode show-trailing-whitespace)))
284284

285285
(php-set-style "drupal")
286+
(should (equal (list "drupal-2" mode t)
287+
(list "drupal-2" mode show-trailing-whitespace)))
286288
(write-file tmp-filename)
287-
(should (equal (list "drupal-after-write" mode t)
288-
(list "drupal-after-write" mode show-trailing-whitespace)))
289289
(should (looking-at-p "$"))))))
290290

291291
(ert-deftest php-mode-test-issue-73 ()

0 commit comments

Comments
 (0)