mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
Fix some tests on OpenBSD
* test/lisp/eshell/em-script-tests.el (em-script-test/batch-file/shebang): "env -S" is not supported. * test/src/fns-tests.el (fns-tests-random): 'random' is non-deterministic on OpenBSD. (Bug#79190)
This commit is contained in:
parent
e658ed0677
commit
42b990cd20
2 changed files with 9 additions and 2 deletions
|
|
@ -143,7 +143,10 @@
|
|||
|
||||
(ert-deftest em-script-test/batch-file/shebang ()
|
||||
"Test running an Eshell script file as a batch script via a shebang."
|
||||
(skip-unless (not (memq system-type '(windows-nt ms-dos))))
|
||||
(skip-when (or (memq system-type '(windows-nt ms-dos))
|
||||
;; OpenBSD's env does not support -S
|
||||
(and (eq system-type 'berkeley-unix)
|
||||
(string-match-p "openbsd" system-configuration))))
|
||||
(ert-with-temp-file temp-file
|
||||
:text (format
|
||||
"#!/usr/bin/env -S %s --batch -f eshell-batch-file\necho hi"
|
||||
|
|
|
|||
|
|
@ -38,7 +38,11 @@
|
|||
(should (= (random 1) 0))
|
||||
(should (>= (random 10) 0))
|
||||
(should (< (random 10) 10))
|
||||
(should (equal (random "seed") (random "seed")))
|
||||
;; On OpenBSD random is non-deterministic.
|
||||
(if (and (eq system-type 'berkeley-unix)
|
||||
(string-match-p "openbsd" system-configuration))
|
||||
(should (not (equal (random "seed") (random "seed"))))
|
||||
(should (equal (random "seed") (random "seed"))))
|
||||
;; The probability of four calls being the same is low.
|
||||
;; This makes sure that the value isn't constant.
|
||||
(should (not (= (random t) (random t) (random t) (random t))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue