mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-11 22:31:12 +02:00
New file.
This commit is contained in:
parent
e8dde70d1f
commit
4064ed2ab5
1 changed files with 43 additions and 0 deletions
43
test-suite/tests/socket.test
Normal file
43
test-suite/tests/socket.test
Normal file
|
@ -0,0 +1,43 @@
|
|||
;;;; socket.test --- test socket functions -*- scheme -*-
|
||||
;;;;
|
||||
;;;; Copyright (C) 2004 Free Software Foundation, Inc.
|
||||
;;;;
|
||||
;;;; This library is free software; you can redistribute it and/or
|
||||
;;;; modify it under the terms of the GNU Lesser General Public
|
||||
;;;; License as published by the Free Software Foundation; either
|
||||
;;;; version 2.1 of the License, or (at your option) any later version.
|
||||
;;;;
|
||||
;;;; This library is distributed in the hope that it will be useful,
|
||||
;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
;;;; Lesser General Public License for more details.
|
||||
;;;;
|
||||
;;;; You should have received a copy of the GNU Lesser General Public
|
||||
;;;; License along with this library; if not, write to the Free Software
|
||||
;;;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
(define-module (test-suite test-numbers)
|
||||
#:use-module (test-suite lib))
|
||||
|
||||
;;;
|
||||
;;; inet-ntop
|
||||
;;;
|
||||
|
||||
(if (defined? 'inet-ntop)
|
||||
(with-test-prefix "inet-ntop"
|
||||
|
||||
(with-test-prefix "ipv6"
|
||||
(pass-if "0"
|
||||
(string? (inet-ntop AF_INET6 0)))
|
||||
|
||||
(pass-if "2^128-1"
|
||||
(string? (inet-ntop AF_INET6 (1- (ash 1 128)))))
|
||||
|
||||
(pass-if-exception "-1" exception:out-of-range
|
||||
(inet-ntop AF_INET6 -1))
|
||||
|
||||
(pass-if-exception "2^128" exception:out-of-range
|
||||
(inet-ntop AF_INET6 (ash 1 128)))
|
||||
|
||||
(pass-if-exception "2^1024" exception:out-of-range
|
||||
(inet-ntop AF_INET6 (ash 1 1024))))))
|
Loading…
Add table
Add a link
Reference in a new issue