summary refs log tree commit diff
path: root/src/testsuite/misc-test.e
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2014-04-17 23:57:38 +0200
committerAlexander Barton <alex@barton.de>2014-06-09 02:15:52 +0200
commit3f807e104572b38143a1015be57d875088ceaebb (patch)
tree1bf5dec4fd7be6709396d4ca99a186199a3c7c94 /src/testsuite/misc-test.e
parent39b8fc65b69c7534228e314c08604341bdf6125f (diff)
downloadngircd-3f807e104572b38143a1015be57d875088ceaebb.tar.gz
ngircd-3f807e104572b38143a1015be57d875088ceaebb.zip
Test suite: Don't use DNS lookups
Different operating systems do behave quite differently when doing DNS
lookups, for example "127.0.0.1" sometimes resolves to "localhost" and
sometimes to "localhost.localdomain" (for example OpenBSD). And other
systems resolve "localhost" to the real host name (for example Cygwin).

So not using DNS at all makes the test site much more portable.
Diffstat (limited to 'src/testsuite/misc-test.e')
-rw-r--r--src/testsuite/misc-test.e8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/testsuite/misc-test.e b/src/testsuite/misc-test.e
index a83bc5b4..f69e7c3c 100644
--- a/src/testsuite/misc-test.e
+++ b/src/testsuite/misc-test.e
@@ -1,7 +1,7 @@
 # ngIRCd test suite
 # Misc test
 
-spawn telnet localhost 6789
+spawn telnet 127.0.0.1 6789
 expect {
 	timeout { exit 1 }
 	"Connected"
@@ -130,7 +130,7 @@ expect {
 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"
@@ -142,7 +142,7 @@ expect {
 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"
@@ -154,7 +154,7 @@ expect {
 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"