]> git.eshelyaron.com Git - emacs.git/commitdiff
Test 'network-lookup-address-info' argument type checking
authorRobert Pluim <rpluim@gmail.com>
Thu, 19 Sep 2024 08:06:20 +0000 (10:06 +0200)
committerEshel Yaron <me@eshelyaron.com>
Fri, 27 Sep 2024 10:20:36 +0000 (12:20 +0200)
* test/src/process-tests.el (lookup-hints-values): Pass in
non-string values, which should result in type errors.

(cherry picked from commit 1b1b922992946f0d17f6a2a2d3515b36a955244e)

test/src/process-tests.el

index 19b14f2d0cbdd7e8f3a440fa8a5f4de9062a6c1e..862416a49a9454055ea1b080515606f35fa9e411 100644 (file)
@@ -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)))