branch: scratch/editorconfig-cc
commit 706ac40ec2abb75687ff5700b73ccf515a2bd37e
Author: 10sr <8.slas...@gmail.com>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

    Make `fixtures' a constant (#176)
---
 ert-tests/editorconfig-core-handle.el | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/ert-tests/editorconfig-core-handle.el 
b/ert-tests/editorconfig-core-handle.el
index 41d96105fb..8447c6766a 100644
--- a/ert-tests/editorconfig-core-handle.el
+++ b/ert-tests/editorconfig-core-handle.el
@@ -1,10 +1,11 @@
 (require 'editorconfig-core-handle)
 
+(defconst fixtures (concat (file-name-directory load-file-name)
+                           "fixtures/"))
+
 (ert-deftest test-editorconfig-core-handle ()
   ;; handle.ini
-  (let* ((fixtures (concat default-directory
-                           "ert-tests/fixtures/"))
-         (conf (concat fixtures
+  (let* ((conf (concat fixtures
                        "handle.ini"))
          (handle (editorconfig-core-handle conf)))
     (should (editorconfig-core-handle-root-p handle))
@@ -17,9 +18,7 @@
                                                                     "a.js"))
                    '((("key1" . "value1")) (("key2" . "value2"))))))
   ;; Test twice for checking cache
-  (let* ((fixtures (concat default-directory
-                           "ert-tests/fixtures/"))
-         (conf (concat fixtures
+  (let* ((conf (concat fixtures
                        "handle.ini"))
          (handle (editorconfig-core-handle conf)))
     (should (editorconfig-core-handle-root-p handle))
@@ -33,9 +32,7 @@
                    '((("key1" . "value1")) (("key2" . "value2"))))))
 
   ;; handle2.ini
-  (let* ((fixtures (concat default-directory
-                           "ert-tests/fixtures/"))
-         (conf (concat fixtures
+  (let* ((conf (concat fixtures
                        "handle2.ini"))
          (handle (editorconfig-core-handle conf)))
     (should-not (editorconfig-core-handle-root-p handle))

Reply via email to