summaryrefslogtreecommitdiff
path: root/lib/zephyr_tests.py
diff options
context:
space:
mode:
authorGravatar Mark W. Eichin <eichin@thok.org>2009-04-10 03:59:41 +0000
committerGravatar Mark W. Eichin <eichin@thok.org>2009-04-10 03:59:41 +0000
commit2de01dbd7d402298870a8698607c08cf58199fed (patch)
tree39ebeeb9a8a7a74e1b22461402b9fc68e1667748 /lib/zephyr_tests.py
parent95297b57d5487ecffac1ce5e4df0fcf6832b9332 (diff)
test ZExpandRealm
Diffstat (limited to 'lib/zephyr_tests.py')
-rwxr-xr-xlib/zephyr_tests.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/zephyr_tests.py b/lib/zephyr_tests.py
index f65918a..dcc275d 100755
--- a/lib/zephyr_tests.py
+++ b/lib/zephyr_tests.py
@@ -322,6 +322,7 @@ class libZephyr(object):
"ZParseNotice",
"ZFormatNotice",
"ZCompareUID",
+ "ZExpandRealm",
]
def __init__(self, library_path=None):
"""connect to the library and build the wrappers"""
@@ -386,6 +387,14 @@ class libZephyr(object):
POINTER(ZUnique_Id_t), # *uid2
]
+ # char *
+ # ZExpandRealm(realm)
+ # char *realm; # mmm 80's
+ self.ZExpandRealm.restype = c_char_p
+ self.ZExpandRealm.argtypes = [
+ c_char_p, # realm
+ ]
+
# library-specific setup...
self.ZInitialize()
@@ -454,6 +463,13 @@ class ZephyrTestSuite(TestSuite):
assert not self._libzephyr.ZCompareUID(notice1.z_uid, notice2.z_uid), "distinct notices don't compare as distinct"
# ctypes_pprint(notice1.z_uid)
+ def test_z_expand_realm(self):
+ """test ZExpandRealm"""
+ assert self._libzephyr.ZExpandRealm("") == ""
+ assert self._libzephyr.ZExpandRealm("localhost") == ""
+ assert self._libzephyr.ZExpandRealm("bitsy.mit.edu") == "ATHENA.MIT.EDU"
+
+
if __name__ == "__main__":
parser = optparse.OptionParser(usage=__doc__,
version = "%%prog %s" % __version__)