aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorPo Lu2024-07-24 11:41:58 +0800
committerPo Lu2024-07-24 11:41:58 +0800
commitdb40b65825f311aaa908f7c169ff6ad3ec5a40e6 (patch)
tree68b0a176342f33f7248a72168457c4e06e40201a /test
parenta793305d166939f26e6fb5418186bb11e65f0e0b (diff)
parent1ee8579eb7d7aae9405f33099559ac8205a59be2 (diff)
downloademacs-db40b65825f311aaa908f7c169ff6ad3ec5a40e6.tar.gz
emacs-db40b65825f311aaa908f7c169ff6ad3ec5a40e6.zip
Merge from savannah/emacs-30
1ee8579eb7d Fix bug#72255 05629d3af0a Delete redundant "a.k.a." in use-package.texi c7609464f70 Document (use-package 'emacs) declarations de9f9add138 Improve 'emacs-news-view-mode' menus and bindings 7588e1f8a9f ; * src/xdisp.c (Fformat_mode_line): Doc fix. 2074e94c3b1 Fix disappearing bar cursor on Hebrew text (bug#72230) 1aaadc8aec5 Fix DocView with DVI files c1382257aa8 ; Fix typo in use-package.texi caf7426f0ca FIx spurious fontification of variable in Java Mode 9b426e15abd Correctly typeset nil and t in texinfo f050b9c5033 Fix Tramp IPv6 handling in tests 46b192c04b1 Update to Org 9.7.8-5-gfdf0e0 87f41b937bc Fix Ftreesit_parser_create
Diffstat (limited to 'test')
-rw-r--r--test/lisp/net/tramp-tests.el82
1 files changed, 55 insertions, 27 deletions
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 786700c727e..e958cd354bc 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -848,19 +848,20 @@ is greater than 10.
848 (should (string-equal (file-remote-p "/method:[::1]:" 'localname) "")) 848 (should (string-equal (file-remote-p "/method:[::1]:" 'localname) ""))
849 (should (string-equal (file-remote-p "/method:[::1]:" 'hop) nil)) 849 (should (string-equal (file-remote-p "/method:[::1]:" 'hop) nil))
850 850
851 ;; No expansion. 851 ;; No expansion. Hop.
852 (should (string-equal 852 (should (string-equal
853 (file-remote-p "/method:user@[::1]:") 853 (file-remote-p "/method:user@[::1]#1234:")
854 (format "/%s:%s@%s:" "method" "user" "[::1]"))) 854 (format "/%s:%s@%s#%s:" "method" "user" "[::1]" "1234")))
855 (should (string-equal 855 (should (string-equal
856 (file-remote-p "/method:user@[::1]:" 'method) "method")) 856 (file-remote-p "/method:user@[::1]#1234:" 'method) "method"))
857 (should 857 (should (string-equal (file-remote-p "/method:user@[::1]#1234:" 'user)
858 (string-equal (file-remote-p "/method:user@[::1]:" 'user) "user")) 858 "user"))
859 (should 859 (should (string-equal
860 (string-equal (file-remote-p "/method:user@[::1]:" 'host) "::1")) 860 (file-remote-p "/method:user@[::1]#1234:" 'host) "::1#1234"))
861 (should (string-equal 861 (should (string-equal
862 (file-remote-p "/method:user@[::1]:" 'localname) "")) 862 (file-remote-p "/method:user@[::1]#1234:" 'localname) ""))
863 (should (string-equal (file-remote-p "/method:user@[::1]:" 'hop) nil)) 863 (should (string-equal
864 (file-remote-p "/method:user@[::1]#1234:" 'hop) nil))
864 865
865 ;; Local file name part. 866 ;; Local file name part.
866 (should (string-equal (file-remote-p "/-:host:/:" 'localname) "/:")) 867 (should (string-equal (file-remote-p "/-:host:/:" 'localname) "/:"))
@@ -1244,6 +1245,20 @@ is greater than 10.
1244 (should (string-equal (file-remote-p "/user@[::1]:" 'localname) "")) 1245 (should (string-equal (file-remote-p "/user@[::1]:" 'localname) ""))
1245 (should (string-equal (file-remote-p "/user@[::1]:" 'hop) nil)) 1246 (should (string-equal (file-remote-p "/user@[::1]:" 'hop) nil))
1246 1247
1248 ;; No expansion. Hop.
1249 (should (string-equal
1250 (file-remote-p "/user@[::1]#1234:")
1251 (format "/%s@%s#%s:" "user" "[::1]" "1234")))
1252 (should (string-equal
1253 (file-remote-p "/user@[::1]#1234:" 'method) "default-method"))
1254 (should
1255 (string-equal (file-remote-p "/user@[::1]#1234:" 'user) "user"))
1256 (should
1257 (string-equal (file-remote-p "/user@[::1]#1234:" 'host) "::1#1234"))
1258 (should
1259 (string-equal (file-remote-p "/user@[::1]#1234:" 'localname) ""))
1260 (should (string-equal (file-remote-p "/user@[::1]#1234:" 'hop) nil))
1261
1247 ;; Local file name part. 1262 ;; Local file name part.
1248 (should (string-equal (file-remote-p "/host:/:" 'localname) "/:")) 1263 (should (string-equal (file-remote-p "/host:/:" 'localname) "/:"))
1249 (should (string-equal (file-remote-p "/host::" 'localname) ":")) 1264 (should (string-equal (file-remote-p "/host::" 'localname) ":"))
@@ -1886,19 +1901,20 @@ is greater than 10.
1886 (should (string-equal (file-remote-p "/[method/::1]" 'localname) "")) 1901 (should (string-equal (file-remote-p "/[method/::1]" 'localname) ""))
1887 (should (string-equal (file-remote-p "/[method/::1]" 'hop) nil)) 1902 (should (string-equal (file-remote-p "/[method/::1]" 'hop) nil))
1888 1903
1889 ;; No expansion. 1904 ;; No expansion. Hop.
1905 (should (string-equal
1906 (file-remote-p "/[method/user@::1#1234]")
1907 (format "/[%s/%s@%s#%s]" "method" "user" "::1" "1234")))
1890 (should (string-equal 1908 (should (string-equal
1891 (file-remote-p "/[method/user@::1]") 1909 (file-remote-p "/[method/user@::1#1234]" 'method) "method"))
1892 (format "/[%s/%s@%s]" "method" "user" "::1")))
1893 (should (string-equal 1910 (should (string-equal
1894 (file-remote-p "/[method/user@::1]" 'method) "method")) 1911 (file-remote-p "/[method/user@::1#1234]" 'user) "user"))
1895 (should (string-equal 1912 (should (string-equal
1896 (file-remote-p "/[method/user@::1]" 'user) "user")) 1913 (file-remote-p "/[method/user@::1#1234]" 'host) "::1#1234"))
1897 (should (string-equal 1914 (should (string-equal
1898 (file-remote-p "/[method/user@::1]" 'host) "::1")) 1915 (file-remote-p "/[method/user@::1#1234]" 'localname) ""))
1899 (should (string-equal 1916 (should (string-equal
1900 (file-remote-p "/[method/user@::1]" 'localname) "")) 1917 (file-remote-p "/[method/user@::1#1234]" 'hop) nil))
1901 (should (string-equal (file-remote-p "/[method/user@::1]" 'hop) nil))
1902 1918
1903 ;; Local file name part. 1919 ;; Local file name part.
1904 (should (string-equal (file-remote-p "/[/host]/:" 'localname) "/:")) 1920 (should (string-equal (file-remote-p "/[/host]/:" 'localname) "/:"))
@@ -2425,16 +2441,22 @@ This checks also `file-name-as-directory', `file-name-directory',
2425 ;; which ruins the tests. 2441 ;; which ruins the tests.
2426 (let ((tramp-default-method 2442 (let ((tramp-default-method
2427 (file-remote-p ert-remote-temporary-file-directory 'method)) 2443 (file-remote-p ert-remote-temporary-file-directory 'method))
2428 (host (file-remote-p ert-remote-temporary-file-directory 'host))) 2444 (host-port
2445 (file-remote-p ert-remote-temporary-file-directory 'host)))
2429 (dolist 2446 (dolist
2430 (file 2447 (file
2431 `(,(format "/%s::" tramp-default-method) 2448 `(,(format "/%s::" tramp-default-method)
2432 ,(format 2449 ,(format
2433 "/-:%s:" 2450 "/-:%s:"
2434 (if (string-match-p tramp-ipv6-regexp host) 2451 ;; `(file-remote-p ... 'host)' eliminates IPv6
2435 (concat 2452 ;; delimiters. Add them.
2436 tramp-prefix-ipv6-format host tramp-postfix-ipv6-format) 2453 (if (string-match tramp-ipv6-regexp host-port)
2437 host)))) 2454 (replace-match
2455 (format
2456 "%s\\&%s"
2457 tramp-prefix-ipv6-format tramp-postfix-ipv6-format)
2458 nil nil host-port)
2459 host-port))))
2438 (should (string-equal (directory-file-name file) file)) 2460 (should (string-equal (directory-file-name file) file))
2439 (should 2461 (should
2440 (string-equal 2462 (string-equal
@@ -4796,8 +4818,11 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
4796 (host (file-remote-p ert-remote-temporary-file-directory 'host)) 4818 (host (file-remote-p ert-remote-temporary-file-directory 'host))
4797 (orig-syntax tramp-syntax) 4819 (orig-syntax tramp-syntax)
4798 (minibuffer-completing-file-name t)) 4820 (minibuffer-completing-file-name t))
4799 (when (and (stringp host) (string-match tramp-host-with-port-regexp host)) 4821 (when (and (stringp host)
4800 (setq host (match-string 1 host))) 4822 (string-match
4823 (rx (regexp tramp-prefix-port-regexp) (regexp tramp-port-regexp))
4824 host))
4825 (setq host (replace-match "" nil nil host)))
4801 4826
4802 (unwind-protect 4827 (unwind-protect
4803 (dolist (syntax (if (tramp--test-expensive-test-p) 4828 (dolist (syntax (if (tramp--test-expensive-test-p)
@@ -4930,8 +4955,11 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
4930 (orig-syntax tramp-syntax) 4955 (orig-syntax tramp-syntax)
4931 (non-essential t) 4956 (non-essential t)
4932 (inhibit-message t)) 4957 (inhibit-message t))
4933 (when (and (stringp host) (string-match tramp-host-with-port-regexp host)) 4958 (when (and (stringp host)
4934 (setq host (match-string 1 host))) 4959 (string-match
4960 (rx (regexp tramp-prefix-port-regexp) (regexp tramp-port-regexp))
4961 host))
4962 (setq host (replace-match "" nil nil host)))
4935 4963
4936 ;; (trace-function #'tramp-completion-file-name-handler) 4964 ;; (trace-function #'tramp-completion-file-name-handler)
4937 ;; (trace-function #'completion-file-name-table) 4965 ;; (trace-function #'completion-file-name-table)