summaryrefslogtreecommitdiff
path: root/lib/zephyr_tests.txt
diff options
context:
space:
mode:
authorGravatar Karl Ramm <kcr@1ts.org>2009-04-14 12:46:00 +0000
committerGravatar Karl Ramm <kcr@1ts.org>2009-04-14 12:46:00 +0000
commit3dd9abb58c23e7441fa6019fb00992d017ac6a36 (patch)
tree2ff3be2d55f71869343c0ebe6cb134b3e5222360 /lib/zephyr_tests.txt
parentd95a96414d5d0c27d994f4b638491d27b6725707 (diff)
Export a new variable, Zauthtype, which indicates what sort of authentication
the library was compiled for. Use this variable in the tests such that they will pass (and, like, test something) if the library was not compiled with authentication.
Diffstat (limited to 'lib/zephyr_tests.txt')
-rw-r--r--lib/zephyr_tests.txt11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/zephyr_tests.txt b/lib/zephyr_tests.txt
index 086d460..c817aa1 100644
--- a/lib/zephyr_tests.txt
+++ b/lib/zephyr_tests.txt
@@ -24,9 +24,12 @@ ZInit() got run by libZephyr, internally. Make sure other things
actually got set up:
>>> assert _z.ZGetFD() == -1
+ >>> Zauthtype = _z.Zauthtype
+ >>> assert Zauthtype in (0, 4, 5)
>>> realm = _z.ZGetRealm()
>>> assert realm
- >>> assert realm != "local-realm"
+ >>> if Zauthtype: assert realm != 'local-realm'
+ >>> if not Zauthtype: assert realm == 'local-realm'
>>> assert _z.ZGetSender()
>>> assert "@" in _z.ZGetSender()
@@ -76,8 +79,10 @@ ZNotice_t as the constructor...
Trivial test of ZExpandRealm, using terribly well known hostnames:
>>> assert _z.ZExpandRealm("") == ""
- >>> assert _z.ZExpandRealm("localhost") == ""
- >>> assert _z.ZExpandRealm("bitsy.mit.edu") == "ATHENA.MIT.EDU"
+ >>> if Zauthtype: assert _z.ZExpandRealm("localhost") == ""
+ >>> if Zauthtype: assert _z.ZExpandRealm("bitsy.mit.edu") == "ATHENA.MIT.EDU"
+ >>> 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: