aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMichael Albinus2016-03-31 11:45:45 +0200
committerMichael Albinus2016-03-31 11:45:45 +0200
commitdf441b362c25c4ad59ea3d83137328d0d4098eaf (patch)
tree431b2dd5a66cf2e71d73a6d3549342b21228cbcc /test
parent22443312188ff097b69d9ff4b87c2b4f7bbbc263 (diff)
downloademacs-df441b362c25c4ad59ea3d83137328d0d4098eaf.tar.gz
emacs-df441b362c25c4ad59ea3d83137328d0d4098eaf.zip
Fix OS X specific settings in tramp-tests
* lisp/net/tramp-sh.el (tramp-maybe-open-connection): Use it. * lisp/net/tramp.el (tramp-get-local-locale): New defun. * test/automated/tramp-tests.el (tramp--test-darwin-p): Remove. (tramp--test-utf8): Improve settings of coding systems. Do not use `tramp--test-darwin-p' anymore. (Bug#22145)
Diffstat (limited to 'test')
-rw-r--r--test/automated/tramp-tests.el22
1 files changed, 8 insertions, 14 deletions
diff --git a/test/automated/tramp-tests.el b/test/automated/tramp-tests.el
index d9563ec9174..a12ee387576 100644
--- a/test/automated/tramp-tests.el
+++ b/test/automated/tramp-tests.el
@@ -1785,14 +1785,6 @@ Several special characters do not work properly there."
1785 (file-truename tramp-test-temporary-file-directory) nil 1785 (file-truename tramp-test-temporary-file-directory) nil
1786 (string-match "^HP-UX" (tramp-get-connection-property v "uname" "")))) 1786 (string-match "^HP-UX" (tramp-get-connection-property v "uname" ""))))
1787 1787
1788(defun tramp--test-darwin-p ()
1789 "Check, whether the remote host runs Mac OS X.
1790Several special characters do not work properly there."
1791 ;; We must refill the cache. `file-truename' does it.
1792 (with-parsed-tramp-file-name
1793 (file-truename tramp-test-temporary-file-directory) nil
1794 (string-match "^Darwin" (tramp-get-connection-property v "uname" ""))))
1795
1796(defun tramp--test-check-files (&rest files) 1788(defun tramp--test-check-files (&rest files)
1797 "Run a simple but comprehensive test over every file in FILES." 1789 "Run a simple but comprehensive test over every file in FILES."
1798 ;; We must use `file-truename' for the temporary directory, because 1790 ;; We must use `file-truename' for the temporary directory, because
@@ -2041,15 +2033,17 @@ Use the `ls' command."
2041 2033
2042(defun tramp--test-utf8 () 2034(defun tramp--test-utf8 ()
2043 "Perform the test in `tramp-test32-utf8*'." 2035 "Perform the test in `tramp-test32-utf8*'."
2044 (let ((coding-system-for-read 'utf-8) 2036 (let* ((utf8 (if (and (eq system-type 'darwin)
2045 (coding-system-for-write 'utf-8) 2037 (memq 'utf-8-hfs (coding-system-list)))
2046 (file-name-coding-system 'utf-8)) 2038 'utf-8-hfs 'utf-8))
2039 (coding-system-for-read utf8)
2040 (coding-system-for-write utf8)
2041 (file-name-coding-system utf8))
2047 (tramp--test-check-files 2042 (tramp--test-check-files
2048 (unless (tramp--test-hpux-p) "Γυρίστε το Γαλαξία με Ώτο Στοπ") 2043 (unless (tramp--test-hpux-p) "Γυρίστε το Γαλαξία με Ώτο Στοπ")
2049 (unless (or (tramp--test-hpux-p) (tramp--test-darwin-p)) 2044 (unless (tramp--test-hpux-p)
2050 "أصبح بوسعك الآن تنزيل نسخة كاملة من موسوعة ويكيبيديا العربية لتصفحها بلا اتصال بالإنترنت") 2045 "أصبح بوسعك الآن تنزيل نسخة كاملة من موسوعة ويكيبيديا العربية لتصفحها بلا اتصال بالإنترنت")
2051 (unless (tramp--test-darwin-p) 2046 "银河系漫游指南系列"
2052 "银河系漫游指南系列")
2053 "Автостопом по гала́ктике"))) 2047 "Автостопом по гала́ктике")))
2054 2048
2055(ert-deftest tramp-test32-utf8 () 2049(ert-deftest tramp-test32-utf8 ()