From 10d7c618ccfd0001dd3adc939b081fa7a38ccbfa Mon Sep 17 00:00:00 2001 From: "Paul A. Patience" Date: Fri, 5 Jan 2024 06:30:06 +0000 Subject: tests: fix on OpenBSD. * tests/common.tl (os-symbol): Add :openbsd. * tests/007/except-4.txr: Skip. * tests/018/crypt.tl: Skip unsupported salts, i.e., without leading "$". * tests/018/gzip.tl: Add -f to gzip command to force compression even if it does not make the file smaller. --- tests/007/except-4.txr | 2 +- tests/018/crypt.tl | 9 ++++++--- tests/018/gzip.tl | 4 +++- tests/common.tl | 1 + 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/tests/007/except-4.txr b/tests/007/except-4.txr index 3f0ab9e5..3c19cb89 100644 --- a/tests/007/except-4.txr +++ b/tests/007/except-4.txr @@ -1,5 +1,5 @@ @(include "../common") -@(if (eq (os-symbol) :solaris)) +@(if (meq (os-symbol) :openbsd :solaris)) @ (do (put-line "bar") (exit t)) @(end) @(try) diff --git a/tests/018/crypt.tl b/tests/018/crypt.tl index cdc51841..dc044878 100644 --- a/tests/018/crypt.tl +++ b/tests/018/crypt.tl @@ -4,9 +4,12 @@ (exit)) (mtest - (crypt nil nil) :error - (crypt "a" "bc") "bcshMw5X24ayQ" - (crypt "a" "bcd") "bcshMw5X24ayQ") + (crypt nil nil) :error) + +(if (neq :openbsd (os-symbol)) + (mtest + (crypt "a" "bc") "bcshMw5X24ayQ" + (crypt "a" "bcd") "bcshMw5X24ayQ")) (if (eq :linux (os-symbol)) (mtest diff --git a/tests/018/gzip.tl b/tests/018/gzip.tl index c6d5767e..712ade3c 100644 --- a/tests/018/gzip.tl +++ b/tests/018/gzip.tl @@ -28,7 +28,9 @@ (when %have-gzip% (file-put-string "test-file" "Hello, World!") (remove-path "test-file.gz") - (shchk "gzip test-file") + (cond ((eq (os-symbol) :openbsd) + (shchk "gzip -f test-file")) + (t (shchk "gzip test-file"))) (test (file-get-string "test-file.gz" "z") "Hello, World!") (each ((mode (cons "z" (list-seq "z0".."z9")))) diff --git a/tests/common.tl b/tests/common.tl index e6697f47..57f411fa 100644 --- a/tests/common.tl +++ b/tests/common.tl @@ -78,6 +78,7 @@ (iff (f^ #/CYGWIN/) (ret :cygwin)) (iff (f^ #/CYGNAL/) (ret :cygnal)) (iff (f^ #/Darwin/) (ret :macos)) + (iff (f^ #/OpenBSD/) (ret :openbsd)) (iff #/BSD/ (ret :bsd)) (ret :unknown)) u.sysname]))) -- cgit v1.2.3