summaryrefslogtreecommitdiff
path: root/lib/zephyr_tests.txt
diff options
context:
space:
mode:
authorGravatar Mark W. Eichin <eichin@thok.org>2009-04-16 04:43:50 +0000
committerGravatar Mark W. Eichin <eichin@thok.org>2009-04-16 04:43:50 +0000
commit0aea3fbd83491c5a57e98d18ebe682505b0978f4 (patch)
treec103a05197e43c799761c59fc11e15fc42e129e7 /lib/zephyr_tests.txt
parent94661ad2d0b4a042d55c6e0e2cc4284ec216f0d9 (diff)
wrap ZMakeAscii
clone it too test the wrapper against the clone fix typo in description add todos add future-coverage list
Diffstat (limited to 'lib/zephyr_tests.txt')
-rw-r--r--lib/zephyr_tests.txt33
1 files changed, 31 insertions, 2 deletions
diff --git a/lib/zephyr_tests.txt b/lib/zephyr_tests.txt
index c817aa1..a6e7998 100644
--- a/lib/zephyr_tests.txt
+++ b/lib/zephyr_tests.txt
@@ -84,7 +84,7 @@ Trivial test of ZExpandRealm, using terribly well known hostnames:
>>> if not Zauthtype: assert _z.ZExpandRealm("localhost") == "LOCALHOST"
>>> if not Zauthtype: assert _z.ZExpandRealm("bitsy.mit.edu") == "BITSY.MIT.EDU"
-Trivial test of ZopenPort and ZClosePort:
+Trivial test of ZOpenPort and ZClosePort:
>>> from ctypes import c_ushort
>>> port = c_ushort(0)
@@ -98,6 +98,21 @@ TODO: consider checking that ZGetFD is returning a socket on that port.
>>> assert _z.ZClosePort() == 0
>>> assert _z.ZGetFD() == -1
+TODO: check that ZGetDestAddr points somewhere, too.
+
+ZMakeAscii takes a target buffer and length and an input buffer and
+length, and generates the "special" Zephyr encoding.
+
+ >>> sample = "test\0message"
+ >>> ref = zephyr_tests.py_make_ascii(sample)
+ >>> from ctypes import create_string_buffer
+ >>> outlen = len(sample) * 6
+ >>> outbuf = create_string_buffer(outlen)
+ >>> st = _z.ZMakeAscii(outbuf, outlen, sample, len(sample))
+ >>> assert st == 0
+ >>> assert outbuf.value == ref, "%r != %r" % (outbuf.value, ref)
+
+
Coverage:
Files complete:
@@ -135,4 +150,18 @@ ZGetLocations (ZGetLocs.c)
ZGetSubscriptions (ZGetSubs.c)
ZGetWGPort (ZGetWGPort.c)
ZIfNotice (ZIfNotice.c)
-(...continue with ZInit.c...)
+ZGetRealm (ZInit.c)
+ZQLength (ZInit.c)
+ZGetDestAddr (ZInit.c)
+ZLocateUser (ZLocateU.c)
+ZInitLocationInfo (ZLocations.c)
+ZSetLocation (ZLocations.c)
+ZUnsetLocation (ZLocations.c)
+ZFlushMyLocations (ZLocations.c)
+ZParseExposureLevel (ZLocations.c)
+Z_SendLocation (ZLocations.c)
+ZMakeAscii32 (ZMakeAscii.c)
+ZMakeAscii16 (ZMakeAscii.c)
+ZMakeZcode32 (ZMakeZcode.c)
+ZMakeZcode (ZMakeZcode.c)
+(...continue with ZMkAuth.c...)