Annotation of ircnowd/src/testsuite/who-test.e, Revision 1.1
1.1 ! tomglok 1: # ngIRCd test suite
! 2: # WHO 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 . . :Real Name\r"
! 12: expect {
! 13: timeout { exit 1 }
! 14: "376"
! 15: }
! 16:
! 17: send "who\r"
! 18: expect {
! 19: timeout { exit 1 }
! 20: ":ngircd.test.server 352 nick \* * * ngircd.test.server nick H :0 Real Name"
! 21: }
! 22:
! 23: send "who 0\r"
! 24: expect {
! 25: timeout { exit 1 }
! 26: ":ngircd.test.server 352 nick \* * * ngircd.test.server nick H :0 Real Name"
! 27: }
! 28:
! 29: send "away :testing\r"
! 30: expect {
! 31: timeout { exit 1 }
! 32: "306 nick"
! 33: }
! 34:
! 35: send "who *\r"
! 36: expect {
! 37: timeout { exit 1 }
! 38: ":ngircd.test.server 352 nick \* * * ngircd.test.server nick G :0 Real Name"
! 39: }
! 40:
! 41: send "join #channel\r"
! 42: expect {
! 43: timeout { exit 1 }
! 44: "@* JOIN :#channel"
! 45: }
! 46:
! 47: send "who #channel\r"
! 48: expect {
! 49: timeout { exit 1 }
! 50: ":ngircd.test.server 352 nick #channel * * ngircd.test.server nick G@ :0 Real Name"
! 51: }
! 52:
! 53: send "mode #channel +v nick\r"
! 54: expect {
! 55: timeout { exit 1 }
! 56: "@* MODE #channel +v nick\r"
! 57: }
! 58:
! 59: send "who #channel\r"
! 60: expect {
! 61: timeout { exit 1 }
! 62: ":ngircd.test.server 352 nick #channel * * ngircd.test.server nick G@ :0 Real Name"
! 63: }
! 64:
! 65: send "who 127.0.0.*\r"
! 66: expect {
! 67: timeout { exit 1 }
! 68: ":ngircd.test.server 352 nick \* * * ngircd.test.server nick G :0 Real Name"
! 69: }
! 70:
! 71: send "mode #channel -o nick\r"
! 72: expect {
! 73: timeout { exit 1 }
! 74: "@* MODE #channel -o nick\r"
! 75: }
! 76:
! 77: send "who #channel\r"
! 78: expect {
! 79: timeout { exit 1 }
! 80: ":ngircd.test.server 352 nick #channel * * ngircd.test.server nick G+ :0 Real Name"
! 81: }
! 82:
! 83: send "who ngircd.test.server\r"
! 84: expect {
! 85: timeout { exit 1 }
! 86: ":ngircd.test.server 352 nick \* * * ngircd.test.server nick G :0 Real Name"
! 87: }
! 88:
! 89: send "part #channel\r"
! 90: expect {
! 91: timeout { exit 1 }
! 92: "@* PART #channel :"
! 93: }
! 94:
! 95: send "who Real?Name\r"
! 96: expect {
! 97: timeout { exit 1 }
! 98: ":ngircd.test.server 352 nick \* * * ngircd.test.server nick G :0 Real Name"
! 99: }
! 100:
! 101: send "oper TestOp 123\r"
! 102: expect {
! 103: timeout { exit 1 }
! 104: "MODE nick :+o"
! 105: }
! 106: expect {
! 107: timeout { exit 1 }
! 108: "381 nick"
! 109: }
! 110:
! 111: send "who 0 o\r"
! 112: expect {
! 113: timeout { exit 1 }
! 114: ":ngircd.test.server 352 nick \* * * ngircd.test.server nick G* :0 Real Name"
! 115: }
! 116:
! 117: send "away\r"
! 118: expect {
! 119: timeout { exit 1 }
! 120: "305 nick"
! 121: }
! 122:
! 123: send "who ??7.*0*\r"
! 124: expect {
! 125: timeout { exit 1 }
! 126: ":ngircd.test.server 352 nick \* * * ngircd.test.server nick H* :0 Real Name"
! 127: }
! 128:
! 129: send "join #opers\r"
! 130: expect {
! 131: timeout { exit 1 }
! 132: "@* JOIN :#opers"
! 133: }
! 134:
! 135: send "who #opers\r"
! 136: expect {
! 137: timeout { exit 1 }
! 138: ":ngircd.test.server 352 nick #opers * * ngircd.test.server nick H*@ :0 Real Name"
! 139: }
! 140:
! 141: send "who Re*me\r"
! 142: expect {
! 143: timeout { exit 1 }
! 144: ":ngircd.test.server 352 nick \* * * ngircd.test.server nick H* :0 Real Name"
! 145: }
! 146:
! 147: send "mode #opers -o nick\r"
! 148: expect {
! 149: timeout { exit 1 }
! 150: "@* MODE #opers -o nick\r"
! 151: }
! 152:
! 153: send "who #opers\r"
! 154: expect {
! 155: timeout { exit 1 }
! 156: ":ngircd.test.server 352 nick #opers * * ngircd.test.server nick H* :0 Real Name"
! 157: }
! 158:
! 159: send "who *.server\r"
! 160: expect {
! 161: timeout { exit 1 }
! 162: ":ngircd.test.server 352 nick \* * * ngircd.test.server nick H* :0 Real Name"
! 163: }
! 164:
! 165: send "mode #opers +v nick\r"
! 166: expect {
! 167: timeout { exit 1 }
! 168: "@* MODE #opers +v nick\r"
! 169: }
! 170:
! 171: send "who #opers\r"
! 172: expect {
! 173: timeout { exit 1 }
! 174: ":ngircd.test.server 352 nick #opers * * ngircd.test.server nick H*+ :0 Real Name"
! 175: }
! 176:
! 177: send "mode #opers +s\r"
! 178: expect {
! 179: timeout { exit 1 }
! 180: "@* MODE #opers +s\r"
! 181: }
! 182:
! 183: send "who n?c?\r"
! 184: expect {
! 185: timeout { exit 1 }
! 186: ":ngircd.test.server 352 nick \* * ngircd.test.server nick H* :0 Real Name"
! 187: }
! 188: expect {
! 189: timeout { exit 1 }
! 190: "315"
! 191: }
! 192:
! 193: send "who #SecretChannel\r"
! 194: expect {
! 195: timeout { exit 1 }
! 196: "315"
! 197: }
! 198:
! 199: send "quit\r"
! 200: expect {
! 201: timeout { exit 1 }
! 202: "Connection closed"
! 203: }
CVSweb