summaryrefslogtreecommitdiff
path: root/test/lisp/net
diff options
context:
space:
mode:
Diffstat (limited to 'test/lisp/net')
-rw-r--r--test/lisp/net/shr-tests.el15
-rw-r--r--test/lisp/net/tramp-archive-tests.el2
-rw-r--r--test/lisp/net/tramp-tests.el15
3 files changed, 26 insertions, 6 deletions
diff --git a/test/lisp/net/shr-tests.el b/test/lisp/net/shr-tests.el
index 821ca5ca636..2254f9bc860 100644
--- a/test/lisp/net/shr-tests.el
+++ b/test/lisp/net/shr-tests.el
@@ -67,6 +67,21 @@
(should-not
(shr--use-cookies-p "http://www.gnu.org" '("http://www.fsf.org")))))
+(ert-deftest shr-srcset ()
+ (should (equal (shr--parse-srcset "") nil))
+
+ (should (equal (shr--parse-srcset "a 10w, b 20w")
+ '(("b" 20) ("a" 10))))
+
+ (should (equal (shr--parse-srcset "a 10w b 20w")
+ '(("a" 10))))
+
+ (should (equal (shr--parse-srcset "https://example.org/1\n\n 10w , https://example.org/2 20w ")
+ '(("https://example.org/2" 20) ("https://example.org/1" 10))))
+
+ (should (equal (shr--parse-srcset "https://example.org/1,2\n\n 10w , https://example.org/2 20w ")
+ '(("https://example.org/2" 20) ("https://example.org/1,2" 10)))))
+
(require 'shr)
;;; shr-tests.el ends here
diff --git a/test/lisp/net/tramp-archive-tests.el b/test/lisp/net/tramp-archive-tests.el
index 54d1ecf3652..f51037aabb4 100644
--- a/test/lisp/net/tramp-archive-tests.el
+++ b/test/lisp/net/tramp-archive-tests.el
@@ -31,7 +31,6 @@
(require 'ert)
(require 'ert-x)
(require 'tramp-archive)
-(defvar tramp-copy-size-limit)
(defvar tramp-persistency-file-name)
;; `ert-resource-file' was introduced in Emacs 28.1.
@@ -96,7 +95,6 @@ Do not hexlify \"/\". This hexlified string is used in `file:///' URLs."
(setq password-cache-expiry nil
tramp-cache-read-persistent-data t ;; For auth-sources.
- tramp-copy-size-limit nil
tramp-persistency-file-name nil
tramp-verbose 0)
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index 55a6feba9b7..5a8d9100e18 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -201,6 +201,14 @@ being the result.")
(file-writable-p ert-remote-temporary-file-directory))))))
(when (cdr tramp--test-enabled-checked)
+ ;; Remove old test files.
+ (dolist (dir `(,temporary-file-directory
+ ,ert-remote-temporary-file-directory))
+ (dolist (file (directory-files dir 'full "\\`\\(\\.#\\)?tramp-test"))
+ (ignore-errors
+ (if (file-directory-p file)
+ (delete-directory file 'recursive)
+ (delete-file file)))))
;; Cleanup connection.
(ignore-errors
(tramp-cleanup-connection tramp-test-vec nil 'keep-password)))
@@ -4078,10 +4086,9 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
(setq tmp-name3 (concat (file-remote-p tmp-name3) tmp-name2)))))
;; Cleanup.
- (ignore-errors
- (delete-file tmp-name2)
- (delete-file tmp-name3)
- (delete-directory tmp-name1 'recursive)))
+ (ignore-errors (delete-file tmp-name2))
+ (ignore-errors (delete-file tmp-name3))
+ (ignore-errors (delete-directory tmp-name1 'recursive)))
;; Detect cyclic symbolic links.
(unwind-protect