summaryrefslogtreecommitdiff
path: root/lib/zephyr_tests.py
diff options
context:
space:
mode:
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__)