[BACK]Return to misc-test.e CVS log [TXT][DIR] Up to [local] / ircnowd / src / testsuite

Annotation of ircnowd/src/testsuite/misc-test.e, Revision 1.1.1.1

1.1       tomglok     1: # ngIRCd test suite
                      2: # Misc test
                      3:
                      4: spawn telnet 127.0.0.1 6789
                      5: expect {
                      6:        timeout { exit 1 }
                      7:        "Connected"
                      8: }
                      9:
                     10: send "nick nick\r"
                     11: send "user user . . :User\r"
                     12: expect {
                     13:        timeout { exit 1 }
                     14:        "376"
                     15: }
                     16:
                     17: # RFC 2812 Section 3.4.1
                     18:
                     19: send "motd\r"
                     20: expect {
                     21:        timeout { exit 1 }
                     22:        "375"
                     23: }
                     24: expect {
                     25:        timeout { exit 1 }
                     26:        "372"
                     27: }
                     28: expect {
                     29:        timeout { exit 1 }
                     30:        "376"
                     31: }
                     32:
                     33: send "motd ngircd.test.server\r"
                     34: expect {
                     35:        timeout { exit 1 }
                     36:        "375"
                     37: }
                     38: expect {
                     39:        timeout { exit 1 }
                     40:        "372"
                     41: }
                     42: expect {
                     43:        timeout { exit 1 }
                     44:        "376"
                     45: }
                     46:
                     47: send "motd doesnotexist\r"
                     48: expect {
                     49:        timeout { exit 1 }
                     50:        "402"
                     51: # note this is not specified in RFC 2812, but probably should be
                     52: }
                     53:
                     54: # RFC 2812 Section 3.4.3
                     55:
                     56: send "version\r"
                     57: expect {
                     58:        timeout { exit 1 }
                     59:        "351"
                     60: }
                     61:
                     62: send "version ngircd.test.server\r"
                     63: expect {
                     64:        timeout { exit 1 }
                     65:        "351"
                     66: }
                     67:
                     68: send "version doesnotexist\r"
                     69: expect {
                     70:        timeout { exit 1 }
                     71:        "402"
                     72: }
                     73:
                     74: # RFC 2812 Section 3.4.6
                     75:
                     76: send "time\r"
                     77: expect {
                     78:        timeout { exit 1 }
                     79:        "391"
                     80: }
                     81:
                     82: send "time ngircd.test.server\r"
                     83: expect {
                     84:        timeout { exit 1 }
                     85:        "391"
                     86: }
                     87:
                     88: send "time doesnotexist\r"
                     89: expect {
                     90:        timeout { exit 1 }
                     91:        "402"
                     92: }
                     93:
                     94: # RFC 2812 Section 3.4.10
                     95:
                     96: send "info\r"
                     97: expect {
                     98:        timeout { exit 1 }
                     99:        "371"
                    100: }
                    101: expect {
                    102:        timeout { exit 1 }
                    103:        "374"
                    104: }
                    105:
                    106: # RFC 2812 Section 4.5
                    107:
                    108: send "summon\r"
                    109: expect {
                    110:        timeout { exit 1 }
                    111:        "445"
                    112: }
                    113:
                    114: # RFC 2812 Section 4.6
                    115:
                    116: send "users\r"
                    117: expect {
                    118:        timeout { exit 1 }
                    119:        "446"
                    120: }
                    121:
                    122: # RFC 2812 Section 4.8
                    123:
                    124: send "userhost\r"
                    125: expect {
                    126:        timeout { exit 1 }
                    127:        "461"
                    128: }
                    129:
                    130: send "userhost nick\r"
                    131: expect {
                    132:        timeout { exit 1 }
                    133:        -re ":ngircd.test.server 302 nick :?nick=+.*@127.0.0.1"
                    134: }
                    135:
                    136: send "userhost doesnotexist\r"
                    137: expect {
                    138:        timeout { exit 1 }
                    139:        ":ngircd.test.server 302 nick :\r"
                    140: }
                    141:
                    142: send "userhost nick doesnotexist nick doesnotexist\r"
                    143: expect {
                    144:        timeout { exit 1 }
                    145:        -re ":ngircd.test.server 302 nick :nick=+.*@127.0.0.1 nick=+.*@127.0.0.1"
                    146: }
                    147:
                    148: send "away :testing\r"
                    149: expect {
                    150:        timeout { exit 1 }
                    151:        "306 nick"
                    152: }
                    153:
                    154: send "userhost nick nick nick nick nick nick\r"
                    155: expect {
                    156:        timeout { exit 1 }
                    157:        -re ":ngircd.test.server 302 nick :nick=-.*@127.0.0.1 nick=-.*@127.0.0.1 nick=-.*@127.0.0.1 nick=-.*@127.0.0.1 nick=-.*@127.0.0.1\r"
                    158: }
                    159:
                    160: send "quit\r"
                    161: expect {
                    162:        timeout { exit 1 }
                    163:        "ERROR"
                    164: }

CVSweb