# ngIRCd test suite
# Channel test
-spawn telnet localhost 6789
+spawn telnet 127.0.0.1 6789
expect {
timeout { exit 1 }
"Connected"
# ngIRCd test suite
# Idle test
-spawn telnet localhost 6789
+spawn telnet 127.0.0.1 6789
expect {
timeout { exit 1 }
"Connected"
# ngIRCd test suite
# Server connect test
-spawn telnet localhost 6789
+spawn telnet 127.0.0.1 6789
expect {
timeout { exit 1 }
"Connected"
# ngIRCd test suite
# INVITE test
-spawn telnet localhost 6789
+spawn telnet 127.0.0.1 6789
expect {
timeout { exit 1 }
"Connected"
# ngIRCd test suite
# JOIN test
-spawn telnet localhost 6789
+spawn telnet 127.0.0.1 6789
expect {
timeout { exit 1 }
"Connected"
# ngIRCd test suite
# KICK test
-spawn telnet localhost 6789
+spawn telnet 127.0.0.1 6789
expect {
timeout { exit 1 }
"Connected"
# ngIRCd test suite
# PRIVMSG and NOTICE test
-spawn telnet localhost 6789
+spawn telnet 127.0.0.1 6789
expect {
timeout { exit 1 }
"Connected"
"MODE nick :-b"
}
-# The following two tests using "localhost" as host name
-# had to be disabled, because there are operating systems
-# out there, that use "localhost.<domain>" as host name
-# for 127.0.0.1 instead of just "localhost".
-# (for example OpenBSD 4, OpenSolaris, ...)
-#
-#send "privmsg ~user\%localhost :test\r"
-#expect {
-# timeout { exit 1 }
-# "@* PRIVMSG nick :test"
-#}
-#
-#send "privmsg Nick!~User@LocalHost :test\r"
-#expect {
-# timeout { exit 1 }
-# "@* PRIVMSG nick :test"
-# "401"
-#}
+send "privmsg ~user\%127.0.0.1 :test\r"
+expect {
+ timeout { exit 1 }
+ "@* PRIVMSG nick :test"
+}
+
+send "privmsg Nick!~User@127.0.0.1 :test\r"
+expect {
+ timeout { exit 1 }
+ "@* PRIVMSG nick :test"
+}
send "away :away\r"
expect {
# ngIRCd test suite
# Misc test
-spawn telnet localhost 6789
+spawn telnet 127.0.0.1 6789
expect {
timeout { exit 1 }
"Connected"
send "userhost nick\r"
expect {
timeout { exit 1 }
- -re ":ngircd.test.server 302 nick :?nick=+.*@(localhos.*|127.0.0.1)"
+ -re ":ngircd.test.server 302 nick :?nick=+.*@127.0.0.1"
}
send "userhost doesnotexist\r"
send "userhost nick doesnotexist nick doesnotexist\r"
expect {
timeout { exit 1 }
- -re ":ngircd.test.server 302 nick :nick=+.*@(localhos.*|127.0.0.1) nick=+.*@(localhos.*|127.0.0.1)"
+ -re ":ngircd.test.server 302 nick :nick=+.*@127.0.0.1 nick=+.*@127.0.0.1"
}
send "away :testing\r"
send "userhost nick nick nick nick nick nick\r"
expect {
timeout { exit 1 }
- -re ":ngircd.test.server 302 nick :nick=-.*@(localhos.*|127.0.0.1) nick=-.*@(localhos.*|127.0.0.1) nick=-.*@(localhos.*|127.0.0.1) nick=-.*@(localhos.*|127.0.0.1) nick=-.*@(localhos.*|127.0.0.1)\r"
+ -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"
}
send "quit\r"
# ngIRCd test suite
# MODE test
-spawn telnet localhost 6789
+spawn telnet 127.0.0.1 6789
expect {
timeout { exit 1 }
"Connected"
OperCanUseMode = yes
Ident = no
IncludeDir = /var/empty
+ DNS = no
PAM = no
[Operator]
OperCanUseMode = yes
Ident = no
IncludeDir = /var/empty
+ DNS = no
PAM = no
[Operator]
# ngIRCd test suite
# Op-less channel test
-spawn telnet localhost 6789
+spawn telnet 127.0.0.1 6789
expect {
timeout { exit 1 }
"Connected"
# ngIRCd test suite
# server-server link test
-spawn telnet localhost 6790
+spawn telnet 127.0.0.1 6790
expect {
timeout { exit 1 }
"Connected"
set timeout 30
-spawn telnet localhost 6789
+spawn telnet 127.0.0.1 6789
expect {
timeout { exit 1 }
"Connected"
# ngIRCd test suite
# WHO test
-spawn telnet localhost 6789
+spawn telnet 127.0.0.1 6789
expect {
timeout { exit 1 }
"Connected"
":ngircd.test.server 352 nick #channel * * ngircd.test.server nick G@ :0 Real Name"
}
-send "who localhos*\r"
+send "who 127.0.0.*\r"
expect {
timeout { exit 1 }
":ngircd.test.server 352 nick \* * * ngircd.test.server nick G :0 Real Name"
"305 nick"
}
-send "who ??cal*ho*\r"
+send "who ??7.*0*\r"
expect {
timeout { exit 1 }
":ngircd.test.server 352 nick \* * * ngircd.test.server nick H* :0 Real Name"
# ngIRCd test suite
# WHOIS test
-spawn telnet localhost 6789
+spawn telnet 127.0.0.1 6789
expect {
timeout { exit 1 }
"Connected"
send "whois nick\r"
expect {
timeout { exit 1 }
- "311 nick nick ~user localhost* \* :Real Name\r"
+ "311 nick nick ~user 127.0.0.1 \* :Real Name\r"
}
expect {
timeout { exit 1 }
send "whois *\r"
expect {
timeout { exit 1 }
- "311 nick nick ~user localhost* \* :Real Name\r"
+ "311 nick nick ~user 127.0.0.1* \* :Real Name\r"
}
send "whois n*\r"
expect {
timeout { exit 1 }
- "311 nick nick ~user localhost* \* :Real Name\r"
+ "311 nick nick ~user 127.0.0.1* \* :Real Name\r"
}
send "whois ?ick\r"
expect {
timeout { exit 1 }
- "311 nick nick ~user localhost* \* :Real Name\r"
+ "311 nick nick ~user 127.0.0.1* \* :Real Name\r"
}
send "whois ????,n?*k\r"
expect {
timeout { exit 1 }
- "311 nick nick ~user localhost* \* :Real Name\r"
+ "311 nick nick ~user 127.0.0.1* \* :Real Name\r"
}
send "whois unknown\r"
send "whois ngircd.test.server2 nick\r"
expect {
timeout { exit 1 }
- ":ngircd.test.server2 311 nick nick ~user localhost* \* :Real Name\r"
+ ":ngircd.test.server2 311 nick nick ~user 127.0.0.1* \* :Real Name\r"
}
send "whois nosuchserver unknown\r"