don't test crypt if not present
authorMike Gran <spk121@yahoo.com>
Sat, 23 Jan 2021 20:10:22 +0000 (12:10 -0800)
committerMike Gran <spk121@yahoo.com>
Sat, 23 Jan 2021 20:10:22 +0000 (12:10 -0800)
* test-suite/tests/posix.test (crypt):  throw unsupported if crypt not presetnt

test-suite/tests/posix.test

index aa0dbc1b27f32bf902c55a330790d0b1f66f1e0a..135f09c11efc8357b959004f4b365cb29ea08beb 100644 (file)
 (with-test-prefix "crypt"
 
   (pass-if "basic usage"
-    (string? (crypt "pass" "abcdefg")))
+    (if (not (defined? 'crypt))
+        (throw 'unsupported)
+        (string? (crypt "pass" "abcdefg"))))
 
   (pass-if "crypt invalid salt on glibc"
     (begin
+      (unless (defined? 'crypt)
+        (throw 'unsupported))
       (unless (string-contains %host-type "-gnu")
         (throw 'unresolved))
       (catch 'system-error