commit 73a782a900137ea92fe8a185c5e0edc22d424390
parent 207701cb6042c3ee20bc5b69119a4483932d6e1c
Author: Antoine Amarilli <a3nm@a3nm.net>
Date: Sat, 21 Feb 2015 12:37:30 +0100
stop testing on quitarg in "/quit quitarg"
It seems that some servers (including ircd-hybrid from Debian testing) never
relay quitarg.
Diffstat:
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/test/1events.sh b/test/1events.sh
@@ -17,7 +17,7 @@ cat >tosay <<EOF
/say hello
/me blah
/ /hello2
-/quit quitarg
+/quit
EOF
cat > ref_message <<EOF
[#events_test1] -!- eventsm has joined #events_test1
@@ -38,7 +38,7 @@ cat > ref_message <<EOF
[#events_test2] <eventsop2> hello
[#events_test2] *** eventsop2 blah
[#events_test2] <eventsop2> /hello2
-[] -!- eventsop2 has quit (quitarg)
+[] -!- eventsop2 has quit
EOF
cat > ref_command <<EOF
[#events_test1] <eventsc> /join #events_test1
@@ -85,11 +85,13 @@ kill $PID4
# must work around "Quit: " prefix and quotes problem
# must remove spurious /mode +i events
+# give up on testing on "quitarg" because some servers do not relay it
diff ref_message <(
sed '
- s/Quit: //;
- s/\(has quit[^"]*\)"/\1/g;
+ s/has quit.*/has quit/g;
s/\(has left[^(]*\) (.*/\1/g' heard_message | grep -v '+i') \
- && diff ref_command <(grep -v '+i' heard_command) \
+ && diff ref_command <(
+ sed '
+ s_/quit.*_/quit_' heard_command | grep -v '+i') \
&& diff ref_nothing heard_nothing