emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/auctex 5d6839e 36/42: Add test for the recent change ab


From: Tassilo Horn
Subject: [elpa] externals/auctex 5d6839e 36/42: Add test for the recent change about `TeX-kpathsea-path-delimiter'
Date: Thu, 23 Nov 2017 06:06:14 -0500 (EST)

branch: externals/auctex
commit 5d6839e9b5cab6e555c80a482fd0cd945e16bf93
Author: Ikumi Keita <address@hidden>
Commit: Ikumi Keita <address@hidden>

    Add test for the recent change about `TeX-kpathsea-path-delimiter'
    
    * tests/tex/path-expansion.el (TeX-kpathsea-delimiter-w32): New test.
---
 tests/tex/path-expansion.el | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/tests/tex/path-expansion.el b/tests/tex/path-expansion.el
index 4b9b5c0..149cbab 100644
--- a/tests/tex/path-expansion.el
+++ b/tests/tex/path-expansion.el
@@ -33,4 +33,27 @@
     (TeX-search-files-by-type 'abc 'global)
     (should (equal var '("str1" "str2")))))
 
+(ert-deftest TeX-kpathsea-delimiter-w32 ()
+  "Check whether `TeX-kpathsea-path-delimiter' is set to \";\" on w32 
platform."
+  ;; This test is meaningful only on w32 platform.
+  (skip-unless (eq system-type 'windows-nt))
+  ;; Provide `TeX-tree-expand' with output which doesn't begin with
+  ;; dos drive letter.
+  (let ((TeX-kpathsea-path-delimiter
+        (eval (car (get 'TeX-kpathsea-path-delimiter 'standard-value)))))
+    (TeX-tree-expand '(".") nil)
+    (should (equal TeX-kpathsea-path-delimiter ";")))
+  ;; Provide `TeX-search-files-kpathsea' with output of only one
+  ;; component (thus without a separator ";".)
+  (let ((TeX-kpathsea-path-delimiter
+        (eval (car (get 'TeX-kpathsea-path-delimiter 'standard-value))))
+       ;; Let's hope that no other files in the temp directory have
+       ;; such a bizarre extension.
+       (temp-file (make-temp-file "TeX-path-expansion" nil ".xxyyzz")))
+    (unwind-protect
+       (TeX-search-files-kpathsea (file-name-directory temp-file)
+                                  '("xxyyzz") nil nil nil)
+      (delete-file temp-file))
+    (should (equal TeX-kpathsea-path-delimiter ";"))))
+
 ;;; command-expansion.el ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]