summaryrefslogtreecommitdiff
path: root/test/lisp/tar-mode-tests.el
diff options
context:
space:
mode:
Diffstat (limited to 'test/lisp/tar-mode-tests.el')
-rw-r--r--test/lisp/tar-mode-tests.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/lisp/tar-mode-tests.el b/test/lisp/tar-mode-tests.el
index 6964d423185..dd430cac2fd 100644
--- a/test/lisp/tar-mode-tests.el
+++ b/test/lisp/tar-mode-tests.el
@@ -24,6 +24,12 @@
(defvar tar-mode-tests-data-directory
(expand-file-name "test/data/decompress" source-directory))
+;; Hack to work around the ERT limitation that we can't reliably use
+;; `with-suppressed-warnings' inside an `ert-deftest'. (Bug#36568)
+(defun tar-mode-tests--tar-grind-file-mode (&rest args)
+ (with-suppressed-warnings ((obsolete tar-grind-file-mode))
+ (apply #'tar-grind-file-mode args)))
+
(ert-deftest tar-mode-test-tar-grind-file-mode ()
(let ((alist (list (cons 448 "rwx------")
(cons 420 "rw-r--r--")
@@ -32,7 +38,7 @@
(cons 1024 "-----S---")
(cons 2048 "--S------"))))
(dolist (x alist)
- (should (equal (cdr x) (tar-grind-file-mode (car x)))))))
+ (should (equal (cdr x) (tar-mode-tests--tar-grind-file-mode (car x)))))))
(ert-deftest tar-mode-test-tar-extract-gz ()
(skip-unless (executable-find "gzip"))