test-ob-shell: Fix test failures on Emacs 26

* testing/lisp/test-ob-shell.el (test-ob-shell/remote-with-stdin-or-cmdline):
Work around non-local exit when running tests on Emacs 26.  Do no call
`kill-matching-buffers' unless Emacs in newer.
This commit is contained in:
Ihor Radchenko 2023-01-22 19:21:25 +03:00
parent f0dfbf0c39
commit ce4f7db3c1
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 4 additions and 2 deletions

View File

@ -251,8 +251,10 @@ echo ${table[spaghetti]}
(org-trim (org-babel-execute-src-block))))
(expected (concat "ARGS: --verbose 23 71"
"\nhello tramp from " (file-local-name default-directory))))
(if (should (equal result expected))
(kill-matching-buffers (format "\\*tramp/mock\\s-%s\\*" system-name) t t)))))))
(if (should (equal result expected)) nil
;; FIXME: Fails with non-local exit on Emacs 26.
(when (version<= "27" emacs-version)
(kill-matching-buffers (format "\\*tramp/mock\\s-%s\\*" system-name) t t))))))))
(ert-deftest test-ob-shell/results-table ()
"Test :results table."