X-Git-Url: https://mudpy.org/gitweb?p=mudpy.git;a=blobdiff_plain;f=bin%2Ftest;h=480c7be252f93b74152c43c2cfd27e91a78e76bb;hp=9dec9f47290e9d039b8e98ba735e05a71468827e;hb=761af6ff61bb547f76c761acbe41d0ef11d51681;hpb=3bb52cb5100b52500ca7368b979d501bdb83fd32 diff --git a/bin/test b/bin/test index 9dec9f4..480c7be 100755 --- a/bin/test +++ b/bin/test @@ -2,32 +2,32 @@ # -*- coding: utf-8 -*- """Regression test script for the mudpy engine.""" -# Copyright (c) 2004-2011 Jeremy Stanley . Permission +# Copyright (c) 2004-2013 Jeremy Stanley . Permission # to use, copy, modify, and distribute this software is granted under # terms provided in the LICENSE file distributed with this software. conversation = ( - ("Identify yourself:", "testuser"), - ("Enter your choice:", "n"), - ("Enter a new password for \"testuser\":", "Test123"), - ("Enter the same new password again:", "Test123"), - ("What would you like to do?", "c"), - ("Pick a gender for your new avatar:", "f"), - ("Choose a name for her:", "1"), - ("What would you like to do?", "a"), - ("Whom would you like to awaken?", ""), - (">", "quit"), - ("What would you like to do?", "d"), - ("Whom would you like to delete?", ""), - ("What would you like to do?", "p"), - ("permanently delete your account?", "y"), - ("Disconnecting...", ""), + (b"Identify yourself:", b"testuser"), + (b"Enter your choice:", b"n"), + (b"Enter a new password for \"testuser\":", b"Test123"), + (b"Enter the same new password again:", b"Test123"), + (b"What would you like to do?", b"c"), + (b"Pick a gender for your new avatar:", b"f"), + (b"Choose a name for her:", b"1"), + (b"What would you like to do?", b"a"), + (b"Whom would you like to awaken?", b""), + (b">", b"quit"), + (b"What would you like to do?", b"d"), + (b"Whom would you like to delete?", b""), + (b"What would you like to do?", b"p"), + (b"permanently delete your account?", b"y"), + (b"Disconnecting...", b""), ) import telnetlib mud = telnetlib.Telnet() mud.open("::1", 6669) for question, answer in conversation: - mud.read_until("%s " % question) - mud.write("%s\r\n" % answer) + mud.read_until(b"%s " % question) + mud.write(b"%s\r\n" % answer) mud.close()