From: Jeremy Stanley Date: Fri, 7 May 2010 00:59:56 +0000 (+0000) Subject: Regression testing script. X-Git-Tag: 0.0.1~308 X-Git-Url: https://mudpy.org/gitweb?p=mudpy.git;a=commitdiff_plain;h=3a6185cccba6b7af5725d2767d0c57de05f9fac5 Regression testing script. * bin/test: New executable script for regression testing against all future commits to the mudpy core engine, modules and sample data. --- diff --git a/bin/test b/bin/test new file mode 100755 index 0000000..8e5939b --- /dev/null +++ b/bin/test @@ -0,0 +1,33 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +u"""Regression test script for the mudpy engine.""" + +# Copyright (c) 2004-2010 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..." , "" ), +) + +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.close()