]> code.delx.au - gnu-emacs/commitdiff
Fix reftex-tests on MS-Windows.
authorEli Zaretskii <eliz@gnu.org>
Fri, 29 Nov 2013 10:33:31 +0000 (12:33 +0200)
committerEli Zaretskii <eliz@gnu.org>
Fri, 29 Nov 2013 10:33:31 +0000 (12:33 +0200)
 test/automated/reftex-tests.el (reftex-parse-from-file-test): Run
 temp-dir through file-truename, to make sure the temporary file
 names are comparable as strings.

test/ChangeLog
test/automated/reftex-tests.el

index 3ed077a68084e2674023d571babc34d7a46f822d..e16e0b2128192f44ff306650217371da89708764 100644 (file)
@@ -1,5 +1,9 @@
 2013-11-29  Eli Zaretskii  <eliz@gnu.org>
 
+       * automated/reftex-tests.el (reftex-parse-from-file-test): Run
+       temp-dir through file-truename, to make sure the temporary file
+       names are comparable as strings.
+
        * automated/decoder-tests.el (ert-test-decoder-prefer-utf-8):
        Force Unix EOLs by using 'utf-8-unix', since the default of
        'utf-8' is system-dependent, while the test expects to see Unix
index de7f36d825ae206d0f1b071dc989fa88e7805bee..74a9f3d806c06cd7f42adaf722c69b06dff919eb 100644 (file)
 
 (ert-deftest reftex-parse-from-file-test ()
   "Test `reftex-parse-from-file'."
-  (let* ((temp-dir (make-temp-file "reftex-parse" 'dir))
+  ;; Use file-truename to convert 8+3 aliases in $TEMP value on
+  ;; MS-Windows into their long file-name equivalents, which is
+  ;; necessary for the 'equal' and 'string=' comparisons below.  This
+  ;; also resolves any symlinks, which cannot be bad for the same
+  ;; reason.  (An alternatrive solution would be to use file-equal-p,
+  ;; but I'm too lazy to do that, as one of the tests compares a
+  ;; list.)
+  (let* ((temp-dir (file-truename (make-temp-file "reftex-parse" 'dir)))
          (tex-file (expand-file-name "test.tex" temp-dir))
          (bib-file (expand-file-name "ref.bib" temp-dir)))
     (with-temp-buffer