From: Robert Pluim Date: Thu, 19 Sep 2024 08:06:20 +0000 (+0200) Subject: Test 'network-lookup-address-info' argument type checking X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=02498c59533f741d70c4761de120d05dd820a5ea;p=emacs.git Test 'network-lookup-address-info' argument type checking * test/src/process-tests.el (lookup-hints-values): Pass in non-string values, which should result in type errors. (cherry picked from commit 1b1b922992946f0d17f6a2a2d3515b36a955244e) --- diff --git a/test/src/process-tests.el b/test/src/process-tests.el index 19b14f2d0cb..862416a49a9 100644 --- a/test/src/process-tests.el +++ b/test/src/process-tests.el @@ -462,7 +462,9 @@ See Bug#30460." (ipv6-addrs '("fe80::1" "e301::203:1" "e301:203::1" "e301:0203::1" "::1" "::0" - "0343:1:2::3" "343:001:2::3"))) + "0343:1:2::3" "343:001:2::3")) + (invalid-values + '(1 a 1.0))) (dolist (a ipv4-invalid-addrs) (should-not (network-lookup-address-info a nil 'numeric)) (should-not (network-lookup-address-info a 'ipv4 'numeric))) @@ -471,6 +473,8 @@ See Bug#30460." (dolist (a ipv4-addrs) (should (network-lookup-address-info a nil 'numeric)) (should (network-lookup-address-info a 'ipv4 'numeric))) + (dolist (a invalid-values) + (should-error (network-lookup-address-info a))) (when (ipv6-is-available) (dolist (a ipv4-addrs) (should-not (network-lookup-address-info a 'ipv6 'numeric)))