insert ./lib/001-to-usermode
+insert ./lib/attempting
insert ./lib/attempting-to-connected
-insert ./lib/conn
-# for: attempting, connect, connected
+insert ./lib/connect
insert ./lib/cmd-disconnect
# for: cmd-disconnect
insert ./lib/disconnect
× fake-testing-timeout
log 1 $ connection_state set to: [failed to connect: FAKE TESTING TIMEOUT]
-insert retry-in : +1 ? :§§
+insert retry-in : + ? :§§
× attempting-to-connected-plus-timeout
-insert attempting-to-connected : +1 6697=10000 WIN_IDS :2
-insert trigger-ping : +0 LOG_ID=1 SERVER_ID :0
+insert attempting-to-connected : + 6697=10000 WIN_IDS :2
+insert trigger-ping : + LOG_ID=1 SERVER_ID :0
insert no-timely-pong
× timeout-w-exponential-wait
-insert attempting : +1 6697 :OLD_PORT
+insert attempting : + 6697 :OLD_PORT
log 1 $ port set to: [NEW_PORT]
-insert fake-testing-timeout : +1 §§ :SECONDS
+insert fake-testing-timeout : + §§ :SECONDS
× ×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
# NB: FakeIrcConnection on any port > 10000 will fail connecting with a timeout
# the TestingClient meanwhile will decrement any port of that range by 1 after
# each started connection attempt
-insert connect : +1 6697 :10003
+insert connect : + 6697 :10003
# check increase of retry waits
-insert timeout-w-exponential-wait : +1 OLD_PORT=10003 NEW_PORT=10002 SECONDS :1
-insert timeout-w-exponential-wait : +1 OLD_PORT=10002 NEW_PORT=10001 SECONDS :2
-insert timeout-w-exponential-wait : +1 OLD_PORT=10001 NEW_PORT=10000 SECONDS :4
+insert timeout-w-exponential-wait : + OLD_PORT=10003 NEW_PORT=10002 SECONDS :1
+insert timeout-w-exponential-wait : + OLD_PORT=10002 NEW_PORT=10001 SECONDS :2
+insert timeout-w-exponential-wait : + OLD_PORT=10001 NEW_PORT=10000 SECONDS :4
# check connecting works with TestingClient port finally reduced to 10000,
# and retry chain also started by in-connection timeout
> /reconnect
insert attempting-to-connected-plus-timeout
> /reconnect
-insert attempting-to-connected : +1 6697=10000 WIN_IDS :2
+insert attempting-to-connected : + 6697=10000 WIN_IDS :2
wait 2
# same way ensure retry chain wasn't solely blocked by being connected
insert 001-to-usermode
insert cmd-disconnect :-1
-insert disconnect1 1: +1 WIN_IDS :2
+insert disconnect1 1: + WIN_IDS :2
wait 2
insert ./lib/usermode
× part-empty
-insert part : + USERIDS_CLEAR :emptied
+insert part-no-msg-me : + USERIDS_CLEAR :emptied
+
+× privmsg-win
+insert privmsg : + TARGET_WIN_ID=NUMBER TARGET :#ch_winNUMBER
× topic-set-to
-log 1 $ channels:CHANNEL:topic set to: [Topic(what='NEWTOPIC', who=NickUserHost(nick='baz', user='~baz', host='baz.baz'))]
-log 4 $ baz!~baz@baz.baz set topic: NEWTOPIC
+log 1 $ channels:CHANNEL:topic set to: [Topic(what='NEWTOPIC', who=NickUserHost(nick='baz', user='~bazbaz', host='baz.baz'))]
+log 4 $ baz!~bazbaz@baz.baz set topic: NEWTOPIC
× reconnect
> /reconnect
insert attempting-to-connected : + WIN_IDS :2,3,4
insert caps-neg-empty
insert 001-setting-nick
-log 1 > JOIN :#ch_test0
+log 1 > JOIN :#ch_win3
insert usermode
-insert servermsglogged : + MSG ::foo!~baz@baz.bar.foo JOIN #ch_test0
-insert join-empty 2: + CHAN_WIN_ID=3 CHANNEL :#ch_test0
+insert servermsglogged : + MSG ::foo!~foofoo@foo.foo JOIN #ch_win3
+insert join-empty 2: + NUMBER :3
× join-already-in
> /join TARGET
log LOG_WIN_ID $ already in that channel
-× part-other-0
-insert servermsglogged : + MSG ::NICK!~NICK@NICK.NICK PART ARGS
-
-× part-other-1
-insert parts-core : + USERIDS_CLEAR=set§to:§REMAINING_IDS CHANNEL=#ch_test0 CHAN_WIN_ID=3 § :
-
-× part-other-no-msg
-insert part-other-0 : + ARGS ::#ch_test0
-insert part-other-1 : + exitMSG= exitPREFIX :
+× part-no-msg-other
+insert part-no-msg 2:-1 + NUMBER=3 USERIDS_CLEAR :set to: REMAINING_IDS
× set-prefix
-insert servermsglogged : + MSG ::foo.bar.baz MODE #ch_test0 MODESET NICK
-log 1 $ channels:#ch_test0:prefixes:PREFIX NEW_IDS
+insert servermsglogged : + MSG ::foo.bar.baz MODE #ch_win3 MODESET NICK
+log 1 $ channels:#ch_win3:prefixes:PREFIX NEW_IDS
log 3 $ NICK VERB PREFIX
× ×--------------------------
log 2 $ not sending, since not in channel
# check join with minimum context (no topic, no other users etc.)
-insert join-empty : + CHAN_WIN_ID=3 CHANNEL :#ch_test0
+insert join-empty : + NUMBER :3
# check privmsg into channel from other window only works by direct addressing
> msg_test1
log 2 # invalid prompt command: not prefixed by /
-insert privmsg : + TARGET_WIN_ID=3 TARGET=#ch_test0 TXT :msg_test1
+insert privmsg-win : + NUMBER=3 TXT :msg_test1
# check from within channel window privmsg works directly and indirectly
> /window 3
-insert privmsg : + TARGET_WIN_ID=3 TARGET=#ch_test0 TXT :msg_test2
+insert privmsg-win : + NUMBER=3 TXT :msg_test2
> msg_test3
-insert privmsg 1: + TARGET_WIN_ID=3 TARGET=#ch_test0 TXT :msg_test3
+insert privmsg-win 1: + NUMBER=3 TXT :msg_test3
# check /part and that it only works from within channel window, and if already in channel
> /window 2
> /part
log 2 # invalid prompt command: /part unknown
> /window 3
-insert part-empty : + CHAN_WIN_ID=3 CHANNEL :#ch_test0
+insert part-empty : + NUMBER :3
> /part
log 3 $ not in that channel
# check /join without argument joins channel previously joined in same window
> /join
-insert join-empty 1: + CHAN_WIN_ID=3 CHANNEL :#ch_test0
+insert join-empty 1: + NUMBER :3
# check cannot /join channel already joined, neither from its window nor from elsewhere
insert join-already-in : + LOG_WIN_ID=3 TARGET :
-insert join-already-in : + LOG_WIN_ID=3 TARGET :#ch_test0
+insert join-already-in : + LOG_WIN_ID=3 TARGET :#ch_win3
> /window 2
-insert join-already-in : + LOG_WIN_ID=2 TARGET :#ch_test0
+insert join-already-in : + LOG_WIN_ID=2 TARGET :#ch_win3
# check join to different channel name initiates new window, even if there's already a window for a channel that's been /parted
> /window 3
-insert part-empty : + CHAN_WIN_ID=3 CHANNEL :#ch_test0
-insert join-empty : + CHAN_WIN_ID=4 CHANNEL :#ch_test1
+insert part-empty : + NUMBER :3
+insert join-empty : + NUMBER :4
# check 353 also understood if using @ rather than =
-insert join-empty : + CHAN_WIN_ID=3 CHANNEL=#ch_test0 = :@
-insert part-empty : + CHAN_WIN_ID=3 CHANNEL :#ch_test0
+insert join-empty : + NUMBER=3 = :@
+insert part-empty : + NUMBER :3
# check /join to, and part from, channel with one other user
-insert join-channel-0 : + CHANNEL=#ch_test0 RESIDENT_NAMES :foo bar
+insert join-channel-0 : + CHANNEL=#ch_win3 RESIDENT_NAMES :foo bar
insert user-set-to :1 + USER_ID=1 USERNICK :bar
-insert join-channel-1 : + CHANNEL=#ch_test0 RESIDENT_IDS :[1], [me]
+insert join-channel-1 : + CHANNEL=#ch_win3 RESIDENT_IDS :[1], [me]
log 3 $ residents: bar, foo
-insert part : + CHANNEL=#ch_test0 CHAN_WIN_ID=3 USERIDS_CLEAR :set to: [1]
+insert part-no-msg-me : + NUMBER=3 USERIDS_CLEAR :set to: [1]
log 1 $ users:1 deleted
# check /join into channel with many other users, with multi-line 353, and membership prefixes
-insert join-channel-0 : + CHANNEL=#ch_test0 RESIDENT_NAMES :foo @baz +oof
+insert join-channel-0 : + CHANNEL=#ch_win3 RESIDENT_NAMES :foo @baz +oof
insert user-set-to :1 + USER_ID=2 USERNICK :baz
-log 1 $ channels:#ch_test0:prefixes:@ set to: [2]
+log 1 $ channels:#ch_win3:prefixes:@ set to: [2]
insert user-set-to :1 + USER_ID=3 USERNICK :oof
-log 1 $ channels:#ch_test0:prefixes:+ set to: [3]
-insert servermsglogged : + MSG ::foo.bar.baz 353 foo = #ch_test0 :+rab zab
+log 1 $ channels:#ch_win3:prefixes:+ set to: [3]
+insert servermsglogged : + MSG ::foo.bar.baz 353 foo = #ch_win3 :+rab zab
insert user-set-to :1 + USER_ID=4 USERNICK :rab
-log 1 $ channels:#ch_test0:prefixes:+ set to: [3], [4]
+log 1 $ channels:#ch_win3:prefixes:+ set to: [3], [4]
insert user-set-to :1 + USER_ID=5 USERNICK :zab
-insert join-channel-1 : + CHANNEL=#ch_test0 RESIDENT_IDS :[2], [3], [4], [5], [me]
+insert join-channel-1 : + CHANNEL=#ch_win3 RESIDENT_IDS :[2], [3], [4], [5], [me]
log 3 $ residents: @baz, +oof, +rab, zab, foo
# check server giving and taking membership prefixes
insert set-prefix : + MODESET=+o PREFIX=@ VERB=gains NICK=foo NEW_IDS :set to: [2], [5], [me]
# check server setting unknown modes towards users
-insert servermsglogged : + MSG ::foo.bar.baz MODE #ch_test0 +a zab
+insert servermsglogged : + MSG ::foo.bar.baz MODE #ch_win3 +a zab
insert no-handler -2: + ALERT_WIN_IDS=2,3,4 ? :for nickname setting channel mode: +a
-insert servermsglogged : + MSG ::foo.bar.baz MODE #ch_test0 -b rab
+insert servermsglogged : + MSG ::foo.bar.baz MODE #ch_win3 -b rab
insert no-handler -2: + ALERT_WIN_IDS=2,3,4 ? :for nickname setting channel mode: -b
# check /join into channel with topic set
> /window 4
-insert part-empty : + CHAN_WIN_ID=4 CHANNEL :#ch_test1
-insert join-channel-0-0 : + CHANNEL :#ch_test1
-insert servermsglogged : + MSG ::foo.bar.baz 332 foo #ch_test1 :foo bar baz
-insert servermsglogged : + MSG ::foo.bar.baz 333 foo #ch_test1 baz!~baz@OLD.baz.baz 1234567890
-insert topic-set-to : + baz.baz=OLD.baz.baz CHANNEL=#ch_test1 NEWTOPIC :foo bar baz
-insert join-channel-0-1 : + CHANNEL=#ch_test1 RESIDENT_NAMES :foo baz
-insert join-channel-1 : + CHANNEL=#ch_test1 RESIDENT_IDS :[2], [me]
+insert part-empty : + NUMBER :4
+insert join-channel-0-0 : + CHANNEL :#ch_win4
+insert servermsglogged : + MSG ::foo.bar.baz 332 foo #ch_win4 :foo bar baz
+insert servermsglogged : + MSG ::foo.bar.baz 333 foo #ch_win4 baz!~bazbaz@OLD.baz.baz 1234567890
+insert topic-set-to : + baz.baz=OLD.baz.baz CHANNEL=#ch_win4 NEWTOPIC :foo bar baz
+insert join-channel-0-1 : + CHANNEL=#ch_win4 RESIDENT_NAMES :foo baz
+insert join-channel-1 : + CHANNEL=#ch_win4 RESIDENT_IDS :[2], [me]
log 4 $ residents: baz, foo
# check _observed_ topic change _does_ affect users database, and …
-insert servermsglogged : + MSG ::baz!~baz@baz.baz TOPIC #ch_test1 :foo bar baz
-insert user-set-to 1: + USER_ID=2 USERNAME=~baz USERHOST :baz.baz
+insert servermsglogged : + MSG ::baz!~bazbaz@baz.baz TOPIC #ch_win4 :foo bar baz
+insert user-set-to 1: + USER_ID=2 USERNAME=~bazbaz USERHOST :baz.baz
# … is echoed into channel window _if_ either content or setter change
-insert topic-set-to : + CHANNEL=#ch_test1 NEWTOPIC :foo bar baz
-insert servermsglogged : + MSG ::baz!~baz@baz.baz TOPIC #ch_test1 :foo bar baz
-insert servermsglogged : + MSG ::baz!~baz@baz.baz TOPIC #ch_test1 :foo foo baz
-insert topic-set-to : + CHANNEL=#ch_test1 NEWTOPIC :foo foo baz
+insert topic-set-to : + CHANNEL=#ch_win4 NEWTOPIC :foo bar baz
+insert servermsglogged : + MSG ::baz!~bazbaz@baz.baz TOPIC #ch_win4 :foo bar baz
+insert servermsglogged : + MSG ::baz!~bazbaz@baz.baz TOPIC #ch_win4 :foo foo baz
+insert topic-set-to : + CHANNEL=#ch_win4 NEWTOPIC :foo foo baz
# check effects of other users' messages (PRIVMSG and NOTICE)
-insert servermsglogged : + MSG ::baz!~baz@baz.baz PRIVMSG #ch_test0 :msg_test3 msg_test4
+insert servermsglogged : + MSG ::baz!~bazbaz@baz.baz PRIVMSG #ch_win3 :msg_test3 msg_test4
log 3 < [@baz] msg_test3 msg_test4
-insert servermsglogged : + MSG ::oof!~oof@oof.oof NOTICE #ch_test0 :msg_test5 msg_test6
-insert user-set-to 1: + USER_ID=3 USERNAME=~oof USERHOST :oof.oof
+insert servermsglogged : + MSG ::oof!~oofoof@oof.oof NOTICE #ch_win3 :msg_test5 msg_test6
+insert user-set-to 1: + USER_ID=3 USERNAME=~oofoof USERHOST :oof.oof
log 3 < (+oof) msg_test5 msg_test6
# check effect own PRIVMSG into channel, now that we got @
-insert privmsg : + TARGET_WIN_ID=3 TARGET=#ch_test0 foo=@foo TXT :msg_test7
+insert privmsg-win : + NUMBER=3 foo=@foo TXT :msg_test7
# check effect of server NOTICE to channel
-insert servermsglogged : + MSG ::*.?.net NOTICE #ch_test0 :msg_test8 msg_test9
+insert servermsglogged : + MSG ::*.?.net NOTICE #ch_win3 :msg_test8 msg_test9
log 3 < (*.?.net) msg_test8 msg_test9
# check part of user visible, and of user NOT visible in other channel
-insert part-other-no-msg : + USER_ID=2 NICK=baz REMAINING_IDS :[3], [4], [5], [me]
-log 1 $ channels:#ch_test0:prefixes:@ set to: [5], [me]
-insert part-other-no-msg : + USER_ID=3 NICK=oof REMAINING_IDS :[4], [5], [me]
-log 1 $ channels:#ch_test0:prefixes:+ emptied
+insert part-no-msg-other : + USER_ID=2 NICK=baz REMAINING_IDS :[3], [4], [5], [me]
+log 1 $ channels:#ch_win3:prefixes:@ set to: [5], [me]
+insert part-no-msg-other : + USER_ID=3 NICK=oof REMAINING_IDS :[4], [5], [me]
+log 1 $ channels:#ch_win3:prefixes:+ emptied
log 1 $ users:3 deleted
# check other-user part with exit message
-insert part-other-0 : + NICK=zab ARGS :#ch_test0 :goodbye
-insert user-set-to 1: + USER_ID=5 USERNAME=~zab USERHOST :zab.zab
-insert part-other-1 : + USER_ID=5 NICK=zab exitPREFIX=:§ exitMSG=goodbye REMAINING_IDS=[4],§[me] § :
-log 1 $ channels:#ch_test0:prefixes:@ set to: [me]
+insert part 2:4 + NICK=zab ARGS :#ch_win3 :goodbye
+insert user-set-to 1: + USER_ID=5 USERNAME=~zabzab USERHOST :zab.zab
+insert parts-core : + USER_ID=5 NICK=zab NUMBER=3 USERIDS_CLEAR=set§to:§[4],§[me] exitMSG=goodbye exitPREFIX=:§ § :
+log 1 $ channels:#ch_win3:prefixes:@ set to: [me]
log 1 $ users:5 deleted
# check re-join of user kept visible in other channel
-insert servermsglogged : + MSG ::baz!~baz@baz.baz JOIN :#ch_test0
-log 1 $ channels:#ch_test0:user_ids set to: [2], [4], [me]
-log 3 $ baz!~baz@baz.baz joins
+insert servermsglogged : + MSG ::baz!~bazbaz@baz.baz JOIN :#ch_win3
+log 1 $ channels:#ch_win3:user_ids set to: [2], [4], [me]
+log 3 $ baz!~bazbaz@baz.baz joins
# check re-join of user NOT kept visible in other channel
-insert servermsglogged : + MSG ::oof!~oof@oof.oof JOIN :#ch_test0
-insert user-set-to : + USER_ID=6 USERNICK=oof USERNAME=~oof USERHOST :oof.oof
-log 1 $ channels:#ch_test0:user_ids set to: [2], [4], [6], [me]
-log 3 $ oof!~oof@oof.oof joins
+insert servermsglogged : + MSG ::oof!~oofoof@oof.oof JOIN :#ch_win3
+insert user-set-to : + USER_ID=6 USERNICK=oof USERNAME=~oofoof USERHOST :oof.oof
+log 1 $ channels:#ch_win3:user_ids set to: [2], [4], [6], [me]
+log 3 $ oof!~oofoof@oof.oof joins
# check renaming of user communicated into all windows of channels they're in – be it others, or oneself
-insert rename : + USER_ID=2 NUH=baz!~baz@baz.baz NEWNICK :bazbaz
-insert rename : + USER_ID=2 NUH=bazbaz!~baz@baz.baz NEWNICK :baz
-insert cmd-nick : + NUH=foo!~baz@baz.bar.foo USER_ID=me NEWNICK :myself
+insert rename : + USER_ID=2 NUH=baz!~bazbaz@baz.baz NEWNICK :bazbaz
+insert rename : + USER_ID=2 NUH=bazbaz!~bazbaz@baz.baz NEWNICK :baz
+insert cmd-nick : + NUH=foo!~foofoo@foo.foo USER_ID=me NEWNICK :myself
# reverting to foo to easen fragment re-use later on
-insert cmd-nick : + NUH=myself!~baz@baz.bar.foo USER_ID=me NEWNICK :foo
+insert cmd-nick : + NUH=myself!~foofoo@foo.foo USER_ID=me NEWNICK :foo
# check QUIT affecting user in all their channels, removing them from DB
-insert servermsglogged : + MSG ::baz!~baz@baz.baz QUIT :Client Quit
+insert servermsglogged : + MSG ::baz!~bazbaz@baz.baz QUIT :Client Quit
log 1 $ users:2:exit_msg set to: [QClient Quit]
-log , $ baz!~baz@baz.baz quits: Client Quit
-insert quit : + CHAN_WIN_ID=3 CHANNEL=#ch_test0 USER_ID=2 NICK=baz REMAINING_IDS :[4], [6], [me]
-insert quit : + CHAN_WIN_ID=4 CHANNEL=#ch_test1 USER_ID=2 NICK=baz REMAINING_IDS :[me]
+log , $ baz!~bazbaz@baz.baz quits: Client Quit
+insert quit : + USER_ID=2 NICK=baz NUMBER=3 REMAINING_IDS :[4], [6], [me]
+insert quit : + USER_ID=2 NICK=baz NUMBER=4 REMAINING_IDS :[me]
log 1 $ users:2 deleted
# check effects of own QUIT while present in one channel
-insert part : + CHAN_WIN_ID=4 USERIDS_CLEAR=emptied CHANNEL :#ch_test1
+insert part-empty : + NUMBER :4
insert cmd-disconnect-0
-insert quit : + CHAN_WIN_ID=3 CHANNEL=#ch_test0 USER_ID=me NICK=foo foo@foo.foo=baz@baz.bar.foo REMAINING_IDS :[4], [6]
-log 1 $ channels:#ch_test0:prefixes:@ emptied
+insert quit : + USER_ID=me NICK=foo NUMBER=3 REMAINING_IDS :[4], [6]
+log 1 $ channels:#ch_win3:prefixes:@ emptied
insert cmd-disconnect-1 :-1
insert disconnect1 : + WIN_IDS :2,3,4
-insert ./lib/conn
-# for: attempting, connect, connected
+insert ./lib/connect-w-password
+# for: connect-to-connected-w-password
× ×---------------------------------------------------
log 0 # Found config at tests/config.toml, reading …
-log 0 # Connecting: {'hostname': 'foo.bar.baz', 'nickname': 'foo', 'password': 'supersecret', 'username': 'baz', 'realname': 'bar', 'port': 1234, 'channels': ['#test', '##testtest']}
-
-insert connect 1: +1 6697 :1234
-log 1 $ password set to: [supersecret]
-insert attempting :-1 +1 6697 :1234
-log 2 $ - password: supersecret
-insert connected : +1 WIN_IDS :2
+log 0 # Connecting: {'hostname': 'foo.bar.baz', 'nickname': 'foo', 'password': 'supersecret', 'username': 'foofoo', 'realname': 'foo foo', 'port': 1234, 'channels': ['#test', '##testtest']}
+insert connect-to-connected-w-password 1: + 6697=1234 SECRET=supersecret WIN_IDS :2
hostname = 'foo.bar.baz'
nickname = 'foo'
password = 'supersecret'
-username = 'baz'
-realname = 'bar'
+username = 'foofoo'
+realname = 'foo foo'
port = 1234
channels = [
'#test',
# handle /disconnect on being connected
insert cmd-disconnect :-1
-insert disconnect1 1: +1 WIN_IDS :2
+insert disconnect1 1: + WIN_IDS :2
# fail to disconnect when already disconnected
> /disconnect
# succeed to re-connect after disconnect
> /reconnect
-insert attempting-to-connected : +1 WIN_IDS :2
+insert attempting-to-connected : + WIN_IDS :2
# allow /disconnect outside connection for auto-connect stops
-insert error-to-disconnected : +0 §§§ :Closing link: (Connection timed out)
-insert retry-in : +1 ? :1
+insert error-to-disconnected : + §§§ :Closing link: (Connection timed out)
+insert retry-in : + ? :1
insert disconnect-to-stop-auto-reconnect
× reconnect-error-logged
> /reconnect
-insert attempting-to-connected : +1 WIN_IDS :2
-insert error-to-disconnected : +0 §§§ :XXX
+insert attempting-to-connected : + WIN_IDS :2
+insert error-to-disconnected : + §§§ :XXX
× ×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
insert connect-to-connected
# test default ERROR handling
-insert error-to-disconnected : +0 §§§ :abc def ghi
+insert error-to-disconnected : + §§§ :abc def ghi
# test ERROR regex (non-)matches
> /window 1
-insert reconnect-error-logged : +0 XXX :Closing link: (this should not match)
-insert reconnect-error-logged : +0 XXX :Closing link: (Connection timed out)
-insert retry-in : +1 ? :1
-insert reconnect-error-logged : +0 XXX :closing Link: (connection timed out)
-insert retry-in : +1 ? :1
-insert reconnect-error-logged : +0 XXX :Closing link: (Ping timeout: 240 seconds)
-insert retry-in : +1 ? :1
+insert reconnect-error-logged : + XXX :Closing link: (this should not match)
+insert reconnect-error-logged : + XXX :Closing link: (Connection timed out)
+insert retry-in : + ? :1
+insert reconnect-error-logged : + XXX :closing Link: (connection timed out)
+insert retry-in : + ? :1
+insert reconnect-error-logged : + XXX :Closing link: (Ping timeout: 240 seconds)
+insert retry-in : + ? :1
insert ./lib/user-set-to
× un-default
-insert servermsglogged : +0 MSG ::foo.bar.baz 005 foo KEY=VALUE :
+insert servermsglogged : + MSG ::foo.bar.baz 005 foo KEY=VALUE :
log 1 $ isupport:KEY set to: [VALUE]
× un-defaults
-insert un-default : +0 KEY=CHANTYPES VALUE :123=456
-insert un-default : +0 KEY=PREFIX VALUE :(ovE)@+=
-insert un-default : +0 KEY=USERLEN VALUE :8
+insert un-default : + KEY=CHANTYPES VALUE :123=456
+insert un-default : + KEY=PREFIX VALUE :(ovE)@+=
+insert un-default : + KEY=USERLEN VALUE :8
× join-and-hi
-insert servermsglogged : +0 MSG ::NICKNAME!TO_CUTq@NICKNAME.NICKNAME JOIN :#ch_test8
-insert user-set-to : +1 USERHOST=NICKNAME.NICKNAME USERNAME=TO_CUTq USERNICK :NICKNAME
-log 1 $ channels:#ch_test8:user_ids set to: RESIDENT_IDS, [me]
+insert servermsglogged : + MSG ::NICKNAME!TO_CUTq@NICKNAME.NICKNAME JOIN :#ch_win9
+insert user-set-to : + USERHOST=NICKNAME.NICKNAME USERNAME=TO_CUTq USERNICK :NICKNAME
+log 1 $ channels:#ch_win9:user_ids set to: RESIDENT_IDS, [me]
log 9 $ NICKNAME!TO_CUTq@NICKNAME.NICKNAME joins
-insert servermsglogged : +0 MSG ::NICKNAME!~TO_CUT@NICKNAME.NICKNAME PRIVMSG #ch_test8 :hi
+insert servermsglogged : + MSG ::NICKNAME!~TO_CUT@NICKNAME.NICKNAME PRIVMSG #ch_win9 :hi
log 1 $ users:USER_ID:user set to: [~TO_CUT]
log 9 < [NICKNAME] hi
insert 001-to-usermode
# check setting of ISUPPORTs both with and without parameters, and last arg ignored
-insert servermsglogged : +0 MSG ::foo.bar.baz 005 foo ABC=DEF GHI :are supported by this server
+insert servermsglogged : + MSG ::foo.bar.baz 005 foo ABC=DEF GHI :are supported by this server
log 1 $ isupport:ABC set to: [DEF]
log 1 $ isupport:GHI set to: []
# check further 005 not re-setting whole dict, and last arg possibly empty
-insert servermsglogged : +0 MSG ::foo.bar.baz 005 foo MNO=PQR STU=VWX,YZ :
+insert servermsglogged : + MSG ::foo.bar.baz 005 foo MNO=PQR STU=VWX,YZ :
log 1 $ isupport:MNO set to: [PQR]
log 1 $ isupport:STU set to: [VWX,YZ]
# check minus args clearing non-defaulty ISUPPORTs, and intermingling with positive args
-insert servermsglogged : +0 MSG ::foo.bar.baz 005 foo -GHI DEF=MNO -STU :ignore me
+insert servermsglogged : + MSG ::foo.bar.baz 005 foo -GHI DEF=MNO -STU :ignore me
log 1 $ isupport:GHI deleted
log 1 $ isupport:DEF set to: [MNO]
log 1 $ isupport:STU deleted
# check setting and un-setting of defaulty ISUPPORTs
insert un-defaults
-insert servermsglogged : +0 MSG ::foo.bar.baz 005 foo -CHANTYPES -PREFIX -USERLEN :
+insert servermsglogged : + MSG ::foo.bar.baz 005 foo -CHANTYPES -PREFIX -USERLEN :
insert isupport-clear 1:
# check disconnect on defaulty ISUPPORTs re-instates the respective defaults
insert un-defaults
> /window 1
insert cmd-disconnect :-1
-insert disconnect1 1: +1 WIN_IDS :2
+insert disconnect1 1: + WIN_IDS :2
> /reconnect
-insert attempting-to-connected : +1 WIN_IDS :2
+insert attempting-to-connected : + WIN_IDS :2
insert caps-neg-empty
insert 001-to-usermode
# check effect of CHANTYPES
-insert join-empty : + CHAN_WIN_ID=3 CHANNEL :#ch_test0
-insert join-empty : + CHAN_WIN_ID=4 CHANNEL :&ch_test1
-insert no-handler : +0 ALERT_WIN_IDS=2,3,4 ? :foo!~baz@baz.bar.foo JOIN $ch_test2
-insert un-default : +0 KEY=CHANTYPES VALUE :#$%
-insert join-empty : + CHAN_WIN_ID=5 CHANNEL :#ch_test3
-insert no-handler : +0 ALERT_WIN_IDS=2,3,4,5 ? :foo!~baz@baz.bar.foo JOIN &ch_test4
-insert join-empty : + CHAN_WIN_ID=6 CHANNEL :#ch_test5
+insert join-empty : + NUMBER :3
+insert join-empty : + NUMBER=4 #ch_win :&ch_win
+insert no-handler : + ALERT_WIN_IDS=2,3,4 ? :foo!~baz@baz.bar.foo JOIN $ch_winA
+insert un-default : + KEY=CHANTYPES VALUE :#$%
+insert join-empty : + NUMBER :5
+insert no-handler : + ALERT_WIN_IDS=2,3,4,5 ? :foo!~baz@baz.bar.foo JOIN &ch_winB
+insert join-empty : + NUMBER=6 #ch_win :$ch_win
# test effect of PREFIX
-insert join-channel-0 : +0 CHANNEL=#ch_test6 RESIDENT_NAMES :foo @bar +baz =quux
-insert user-set-to :1 +1 USER_ID=1 USERNICK :bar
-log 1 $ channels:#ch_test6:prefixes:@ set to: [1]
-insert user-set-to :1 +1 USER_ID=2 USERNICK :baz
-log 1 $ channels:#ch_test6:prefixes:+ set to: [2]
-insert user-set-to :1 +1 USER_ID=3 USERNICK :=quux
-insert join-channel-1 : +0 CHANNEL=#ch_test6 RESIDENT_IDS :[1], [2], [3], [me]
+insert join-channel-0 : + CHANNEL=#ch_win7 RESIDENT_NAMES :foo @bar +baz =quux
+insert user-set-to :1 + USER_ID=1 USERNICK :bar
+log 1 $ channels:#ch_win7:prefixes:@ set to: [1]
+insert user-set-to :1 + USER_ID=2 USERNICK :baz
+log 1 $ channels:#ch_win7:prefixes:+ set to: [2]
+insert user-set-to :1 + USER_ID=3 USERNICK :=quux
+insert join-channel-1 : + CHANNEL=#ch_win7 RESIDENT_IDS :[1], [2], [3], [me]
log 7 $ residents: @bar, +baz, =quux, foo
-insert un-default : +0 KEY=PREFIX VALUE :(vE)+=
-insert join-channel-0 : +0 CHANNEL=#ch_test7 RESIDENT_NAMES :foo @bar +baz =quux
-insert user-set-to :1 +1 USER_ID=4 USERNICK :@bar
-log 1 $ channels:#ch_test7:prefixes:+ set to: [2]
-insert user-set-to :1 +1 USER_ID=5 USERNICK :quux
-log 1 $ channels:#ch_test7:prefixes:= set to: [5]
-insert join-channel-1 : +0 CHANNEL=#ch_test7 RESIDENT_IDS :[2], [4], [5], [me]
+insert un-default : + KEY=PREFIX VALUE :(vE)+=
+insert join-channel-0 : +0 CHANNEL=#ch_win8 RESIDENT_NAMES :foo @bar +baz =quux
+insert user-set-to :1 + USER_ID=4 USERNICK :@bar
+log 1 $ channels:#ch_win8:prefixes:+ set to: [2]
+insert user-set-to :1 + USER_ID=5 USERNICK :quux
+log 1 $ channels:#ch_win8:prefixes:= set to: [5]
+insert join-channel-1 : + CHANNEL=#ch_win8 RESIDENT_IDS :[2], [4], [5], [me]
log 8 $ residents: +baz, @bar, =quux, foo
# test effect of USERLEN
-insert join-empty : + CHAN_WIN_ID=9 CHANNEL :#ch_test8
-insert join-and-hi : +0 NICKNAME=user0 USER_ID=6 TO_CUT=foobarbaz RESIDENT_IDS :[6]
-insert un-default : +0 KEY=USERLEN VALUE :8
-insert join-and-hi : +0 NICKNAME=user1 USER_ID=7 TO_CUT=foobarb RESIDENT_IDS :[6], [7]
+insert join-empty : + NUMBER :9
+insert join-and-hi : + NICKNAME=user0 USER_ID=6 TO_CUT=foobarbaz RESIDENT_IDS :[6]
+insert un-default : + KEY=USERLEN VALUE :8
+insert join-and-hi : + NICKNAME=user1 USER_ID=7 TO_CUT=foobarb RESIDENT_IDS :[6], [7]
insert ./lib/user-set-to
× 001-setting-nick
-insert servermsglogged : +0 MSG ::foo.bar.baz 001 foo :Welcome to the foo.bar.baz network
-insert user-set-to :1 +1 USER_ID=me USERNICK :foo
+insert servermsglogged : + MSG ::foo.bar.baz 001 foo :Welcome to the foo.bar.baz network
+insert user-set-to :1 + USER_ID=me USERNICK :foo
--- /dev/null
+× attempting
+log 1 $ connection_state set to: [connecting]
+log 2 $ attempting connection to foo.bar.baz:6697 identifying with …
+log 2 $ - nickname: foo
+log 2 $ - realname: foo foo
+log 2 $ - username: foofoo
+log 2 $ - no password
+
-insert ./lib/conn
-# for: attempting, connected
+insert ./lib/attempting
+insert ./lib/connected
× attempting-to-connected
insert attempting
× cmd-disconnect-0
> /disconnect
log 1 > QUIT :ircplom says bye
-insert servermsglogged : +0 MSG ::foo!~baz@baz.bar.foo QUIT :Client Quit
+insert servermsglogged : +0 MSG ::foo!~foofoo@foo.foo QUIT :Client Quit
log 1 $ users:me:exit_msg set to: [QClient Quit]
-log , $ foo!~baz@baz.bar.foo quits: Client Quit
+log , $ foo!~foofoo@foo.foo quits: Client Quit
× cmd-disconnect-1
insert error-to-disconnect : +0 ? ::Closing link: foo.foo (Client Quit)
+++ /dev/null
-insert ./lib/isupport-clear
-
-× attempting
-log 1 $ connection_state set to: [connecting]
-log 2 $ attempting connection to foo.bar.baz:6697 identifying with …
-log 2 $ - nickname: foo
-log 2 $ - realname: bar
-log 2 $ - username: baz
-log 2 $ - no password
-
-× connect
-> /connect foo.bar.baz:6697 foo bar:baz
-insert isupport-clear 1: +1
-log , $ NOT CONNECTED
-log 1 $ hostname set to: [foo.bar.baz]
-log 1 $ port set to: [6697]
-log 1 $ nick_wanted set to: [foo]
-log 1 $ user_wanted set to: [baz]
-log 1 $ realname set to: [bar]
-
-× connected
-log 1 $ connection_state set to: [connected]
-log WIN_IDS $ CONNECTED
-log 1 > CAP LS :302
-log 1 > USER baz 0 * :bar
-log 1 > NICK :foo
--- /dev/null
+insert ./lib/isupport-clear
+
+× connect
+> /connect foo.bar.baz:6697 foo foo foo:foofoo
+insert isupport-clear 1: +1
+log , $ NOT CONNECTED
+log 1 $ hostname set to: [foo.bar.baz]
+log 1 $ port set to: [6697]
+log 1 $ nick_wanted set to: [foo]
+log 1 $ user_wanted set to: [foofoo]
+log 1 $ realname set to: [foo foo]
insert ./lib/attempting-to-connected
-# for: attempting-to-connected
-insert ./lib/conn
-# for: connect
+insert ./lib/connect
× connect-to-connected
insert connect
--- /dev/null
+insert ./lib/attempting
+insert ./lib/connect
+insert ./lib/connected
+
+× connect-w-password
+> /connect foo.bar.baz:6697 foo:SECRET foo foo:foofoo
+insert connect 1:
+log 1 $ password set to: [SECRET]
+
+× attempting-to-connected-w-password
+insert attempting :-1
+log 2 $ - password: SECRET
+insert connected
+
+× connect-to-connected-w-password
+insert connect-w-password
+insert attempting-to-connected-w-password
--- /dev/null
+× connected
+log 1 $ connection_state set to: [connected]
+log WIN_IDS $ CONNECTED
+log 1 > CAP LS :302
+log 1 > USER foofoo 0 * :foo foo
+log 1 > NICK :foo
+
insert ./lib/servermsglogged
× error-to-disconnect
-insert servermsglogged : +0 MSG :ERROR :?
-insert disconnect0 : +1 EXIT_MSG :?
+insert servermsglogged : + MSG :ERROR :?
+insert disconnect0 : + EXIT_MSG :?
insert ./lib/error-to-disconnect
× error-to-disconnected
-insert error-to-disconnect :-1 +0 ? :§§§
-insert disconnect1 1:-1 +1 WIN_IDS :2
+insert error-to-disconnect :-1 + ? :§§§
+insert disconnect1 1:-1 + WIN_IDS :2
× join-channel-0-0
> /join CHANNEL
log 1 > JOIN :CHANNEL
-insert servermsglogged : + MSG ::foo!~baz@baz.bar.foo JOIN :CHANNEL
+insert servermsglogged : + MSG ::foo!~foofoo@foo.foo JOIN :CHANNEL
× join-channel-0-1
insert servermsglogged : + MSG ::foo.bar.baz 353 foo = CHANNEL :RESIDENT_NAMES
log 1 $ channels:CHANNEL:user_ids set to: RESIDENT_IDS
× join-empty
-insert join-channel-0 : + RESIDENT_NAMES :foo
-insert join-channel-1 : + RESIDENT_IDS :[me]
-log CHAN_WIN_ID $ residents: foo
+insert join-channel-0 : + CHANNEL=#ch_winNUMBER RESIDENT_NAMES :foo
+insert join-channel-1 : + CHANNEL=#ch_winNUMBER RESIDENT_IDS :[me]
+log NUMBER $ residents: foo
× no-timely-pong
servermsg 0 timeout
servermsg 0 no timely PONG from server
-insert disconnect0 :-1 +1 EXIT_MSG :broken: no timely PONG from server
-insert disconnect1 1:-1 +1 WIN_IDS :2
-insert retry-in : +1 ? :1
+insert disconnect0 :-1 + EXIT_MSG :broken: no timely PONG from server
+insert disconnect1 1:-1 + WIN_IDS :2
+insert retry-in : + ? :1
insert ./lib/servermsglogged
× exit-channel
-log 1 $ channels:CHANNEL:exits:USER_ID set to: [exitTYPEexitMSG]
-log 1 $ channels:CHANNEL:user_ids USERIDS_CLEAR
-log CHAN_WIN_ID $ NICK!~NICK@NICK.NICK exitDESCexitPREFIXexitMSG
-log 1 $ channels:CHANNEL:exits:USER_ID deleted
+log 1 $ channels:#ch_winNUMBER:exits:USER_ID set to: [exitTYPEexitMSG]
+log 1 $ channels:#ch_winNUMBER:user_ids USERIDS_CLEAR
+log NUMBER $ NICK!~NICKNICK@NICK.NICK exitDESCexitPREFIXexitMSG
+log 1 $ channels:#ch_winNUMBER:exits:USER_ID deleted
× parts-core
insert exit-channel : + exitTYPE=P exitDESC :parts
× part
> /part
-log 1 > PART :CHANNEL
-insert servermsglogged : + MSG ::foo!~baz@baz.bar.foo PART :CHANNEL
-insert parts-core : + exitPREFIX= exitMSG= USER_ID=me NICK=foo foo@foo.foo :baz@baz.bar.foo
-log 1 $ channels:CHANNEL deleted
+log 1 > PART :#ch_winNUMBER
+insert servermsglogged : + MSG ::NICK!~NICKNICK@NICK.NICK PART ARGS
+insert parts-core : + exitPREFIX= exitMSG :
+log 1 $ channels:#ch_winNUMBER deleted
+
+× part-no-msg
+insert part : + ARGS ::#ch_winNUMBER
+
+× part-no-msg-me
+insert part-no-msg : + USER_ID=me NICK :foo
× quits
insert exit-channel : + exitTYPE=Q exitDESC=quits exitPREFIX=:§ exitMSG=Client§Quit § :
insert ./lib/user-set-to
× usermode
-insert servermsglogged : +0 MSG ::foo!~baz@baz.bar.foo MODE foo +ABC
-insert user-set-to 1: +1 USER_ID=me USERNAME=~baz USERHOST :baz.bar.foo
+insert servermsglogged : + MSG ::foo!~foofoo@foo.foo MODE foo +ABC
+insert user-set-to 1: + USER_ID=me USERNAME=~foofoo USERHOST :foo.foo
log 1 $ users:me:modes set to: [ABC]
# on re-connect, ensure timer cleared, i.e. only 2nd time-out will disconnect
> /window 1
> /reconnect
-insert attempting-to-connected : +1 WIN_IDS :2
+insert attempting-to-connected : + WIN_IDS :2
insert full-timeout
insert ./lib/cap-msg
insert ./lib/cmd-disconnect
insert ./lib/cmd-nick
-insert ./lib/conn
-# for: attempting, connect, connected
+insert ./lib/connect-w-password
+# for: attempting-to-connected-w-password, connect-to-connected-w-password
insert ./lib/disconnect
# for: disconnect0, disconnect1
insert ./lib/disconnect-to-stop-auto-reconnect
# for: join-channel-0, join-channel-1
insert ./lib/no-handler
insert ./lib/part
-# for: part, quit, quits
+# for: part-no-msg-me, quit, quits
insert ./lib/pingpong
insert ./lib/privmsg
insert ./lib/req-sasl
# expect some NOTICE and PING to process/reply during initiation
insert servernotice : + XXX :*** Looking up your ident...
insert servernotice : + XXX :*** Looking up your hostname...
-insert servernotice : + XXX :*** Found your hostname (baz.bar.foo)
+insert servernotice : + XXX :*** Found your hostname (foo.foo)
insert ping-pong
# handle 433
insert servermsglogged : + MSG ::foo1 MODE foo1 :+Ziw
log 1 $ users:me:modes set to: [Ziw]
# handle bot query NOTICE
-insert servermsglogged : + MSG ::SaslServ!SaslServ@services.bar.baz NOTICE foo1 :Last login from ~baz@foo.bar.baz on Jan 1 22:00:00 2021 +0000.
-log 3 < (SaslServ) Last login from ~baz@foo.bar.baz on Jan 1 22:00:00 2021 +0000.
+insert servermsglogged : + MSG ::SaslServ!SaslServ@services.bar.baz NOTICE foo1 :Last login from ~foo@foo.foo on Jan 1 22:00:00 2021 +0000.
+log 3 < (SaslServ) Last login from ~foo@foo.foo on Jan 1 22:00:00 2021 +0000.
× during_conn
# test recoverable 432
-insert cmd-nick :2 +1 NEWNICK :@foo
+insert cmd-nick :2 + NEWNICK :@foo
insert servermsglogged : + MSG ::*.?.net 432 foo1 @foo :Erroneous nickname
log 1 $ nickname refused for bad format, keeping current one
# rename to easen code-reuse
-insert cmd-nick :4 + NUH=foo1!~baz@baz.bar.foo NEWNICK :foo
-log 1 $ users:me:user set to: [~baz]
-log 1 $ users:me:host set to: [baz.bar.foo]
-insert cmd-nick 4:-2 +1 USER_ID=me NEWNICK :foo
-log rename_win_ids $ foo1!~baz@baz.bar.foo renames foo
+insert cmd-nick :4 + NUH=foo1!~foofoo@foo.foo NEWNICK :foo
+log 1 $ users:me:user set to: [~foofoo]
+log 1 $ users:me:host set to: [foo.foo]
+insert cmd-nick 4:-2 + USER_ID=me NEWNICK :foo
+log rename_win_ids $ foo1!~foofoo@foo.foo renames foo
# join channel with other user
-insert join-channel-0 : + CHANNEL=#test RESIDENT_NAMES :foo @baz
-insert user-set-to :1 +1 USER_ID=1 USERNICK :baz
-log 1 $ channels:#test:prefixes:@ set to: [1]
-insert join-channel-1 : + CHANNEL=#test RESIDENT_IDS :[1], [me]
+insert join-channel-0 : + CHANNEL=#ch_win4 RESIDENT_NAMES :foo @baz
+insert user-set-to :1 + USER_ID=1 USERNICK :baz
+log 1 $ channels:#ch_win4:prefixes:@ set to: [1]
+insert join-channel-1 : + CHANNEL=#ch_win4 RESIDENT_IDS :[1], [me]
log 4 $ residents: @baz, foo
# process non-self channel JOIN
-insert servermsglogged : + MSG ::bar!~bar@bar.bar JOIN :#test
-insert user-set-to : +1 USER_ID=2 USERNICK=bar USERNAME=~bar USERHOST :bar.bar
-log 1 $ channels:#test:user_ids set to: [1], [2], [me]
-log 4 $ bar!~bar@bar.bar joins
+insert servermsglogged : + MSG ::bar!~barbar@bar.bar JOIN :#ch_win4
+insert user-set-to : + USER_ID=2 USERNICK=bar USERNAME=~barbar USERHOST :bar.bar
+log 1 $ channels:#ch_win4:user_ids set to: [1], [2], [me]
+log 4 $ bar!~barbar@bar.bar joins
# join second channel with partial residents identity to compare distribution of resident-specific messages
-insert join-channel-0 : + CHANNEL=#testtest RESIDENT_NAMES :foo bar
-insert join-channel-1 : + CHANNEL=#testtest RESIDENT_IDS :[2], [me]
+insert join-channel-0 : + CHANNEL=#ch_win5 RESIDENT_NAMES :foo bar
+insert join-channel-1 : + CHANNEL=#ch_win5 RESIDENT_IDS :[2], [me]
log 5 $ residents: bar, foo
# handle query window with known user
-insert servermsglogged : + MSG ::bar!~bar@bar.bar PRIVMSG foo :hi there
+insert servermsglogged : + MSG ::bar!~barbar@bar.bar PRIVMSG foo :hi there
log 6 < [bar] hi there
-insert privmsg : +1 TARGET_WIN_ID=6 TARGET=bar TXT :hello, how is it going
-insert servermsglogged : + MSG ::bar!~bar@bar.bar PRIVMSG foo :fine!
+insert privmsg : + TARGET_WIN_ID=6 TARGET=bar TXT :hello, how is it going
+insert servermsglogged : + MSG ::bar!~barbar@bar.bar PRIVMSG foo :fine!
log 6 < [bar] fine!
# handle failure to query absent user
-insert privmsg : +1 TARGET_WIN_ID=7 TARGET=barbar TXT :hello!
+insert privmsg : + TARGET_WIN_ID=7 TARGET=barbar TXT :hello!
insert servermsglogged : + MSG ::*.?.net 401 foo barbar :No such nick/channel
log 7 $ barbar not online
# handle non-self renaming, even into window of previously not found target
-insert servermsglogged : + MSG ::bar!~bar@bar.bar NICK :barbar
+insert servermsglogged : + MSG ::bar!~barbar@bar.bar NICK :barbar
log 1 $ users:2:nick set to: [barbar]
-log 4,5,6,7 $ bar!~bar@bar.bar renames barbar
+log 4,5,6,7 $ bar!~barbar@bar.bar renames barbar
# handle non-self QUIT
-insert servermsglogged : + MSG ::barbar!~bar@bar.bar QUIT :Client Quit
+insert servermsglogged : + MSG ::barbar!~barbar@bar.bar QUIT :Client Quit
log 1 $ users:2:exit_msg set to: [QClient Quit]
-log 6,7 $ barbar!~bar@bar.bar quits: Client Quit
-insert quit : + CHAN_WIN_ID=4 CHANNEL=#test USER_ID=2 NICK=bar bar!=barbar! REMAINING_IDS :[1], [me]
-insert quit : + CHAN_WIN_ID=5 CHANNEL=#testtest USER_ID=2 NICK=bar bar!=barbar! REMAINING_IDS :[me]
+log 6,7 $ barbar!~barbar@bar.bar quits: Client Quit
+insert quit : + USER_ID=2 NICK=bar NUMBER=4 bar!=barbar! REMAINING_IDS :[1], [me]
+insert quit : + USER_ID=2 NICK=bar NUMBER=5 bar!=barbar! REMAINING_IDS :[me]
log 1 $ users:2 deleted
# handle self-PART: clear channel, and its squatters
> /window 4
-insert part : + CHAN_WIN_ID=4 CHANNEL=#test USERIDS_CLEAR :set to: [1]
+insert part-no-msg-me : + NUMBER=4 USERIDS_CLEAR :set to: [1]
log 1 $ users:1 deleted
# handle lack of implementation
# handle /disconnect, clear all
insert cmd-disconnect-0 :-1
-log 3,6,7 $ foo!~baz@baz.bar.foo quits: Client Quit
-insert quits : + CHAN_WIN_ID=5 CHANNEL=#testtest USER_ID=me NICK=foo foo@foo.foo=baz@baz.bar.foo USERIDS_CLEAR :emptied
+log 3,6,7 $ foo!~foofoo@foo.foo quits: Client Quit
+insert quits : + USER_ID=me NICK=foo NUMBER=5 USERIDS_CLEAR :emptied
insert cmd-disconnect-1
-insert disconnect1 :-1 +1 WIN_IDS :2,3,4,5,6,7
+insert disconnect1 :-1 + WIN_IDS :2,3,4,5,6,7
log 1 $ motd emptied
log 1 $ users cleared
> /window 1
> /privmsg barbar test
log 1 $ cannot send, connection seems closed
-> /privmsg #test test
+> /privmsg #win4 test
log 1 $ not sending, since not in channel
× ×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
# on /connect init databases, log in new windows, connect with values set by /connect, init CAP negotiation
-> /connect foo.bar.baz:6697 foo:bar bar:baz
-insert connect 1:
-log 1 $ password set to: [bar]
-insert attempting :-1
-log 2 $ - password: bar
+insert connect-to-connected-w-password : + WIN_IDS :2
-insert connected : +1 WIN_IDS :2
insert conn_init_1
insert conn_init_2
# check difference in available commands when switching to client window
-> /join #test
+> /join #ch_win4
log 0 # invalid prompt command: /join unknown
insert enter-list-start
log 0 # 1) foo.bar.baz:debug
insert during_conn : + rename_win_ids :3
# test setting up second client, but 432 irrecoverably
-> /connect baz.bar.foo:6697 ?foo bar:baz
+> /connect baz.bar.foo:6697 ?foo foo foo:foofoo
insert connect 1: +8 foo.bar.baz=baz.bar.foo [foo] :[?foo]
insert attempting :2 +8 foo.bar.baz :baz.bar.foo
log 9 $ - nickname: ?foo
# check that (save TUI tests assuming start on window 0, and no 4 yet) on reconnect, all the same effects can be expected
> /window 1
> /reconnect
-insert attempting :-1
-log 2 $ - password: bar
-insert connected : +1 WIN_IDS :2,3,4,5,6,7
+insert attempting-to-connected-w-password : + WIN_IDS :2,3,4,5,6,7
insert conn_init_1
insert conn_init_2 :2
-log 1 > JOIN :#testtest
+log 1 > JOIN :#ch_win5
insert conn_init_2 2:
insert during_conn : + rename_win_ids :3,6,7
insert line-server-log : +4 ? :hostname set to: [foo.bar.baz]
insert line-server-log : +5 ? :port set to: [6697]
insert line-server-log : +6 ? :nick_wanted set to: [foo]
-insert line-server-log : +7 ? :user_wanted set to: [baz]
-insert line-server-log : +8 ? :realname set to: [bar]
+insert line-server-log : +7 ? :user_wanted set to: [foofoo]
+insert line-server-log : +8 ? :realname set to: [foo foo]
insert line-server-log : +9 ? :connection_state set to: [connecting]
insert line-server-log : +10 ? :connection_state set to: [connected]
insert line-client-msg : +11 ? :CAP LS :302
-insert line-client-msg : +12 ? :USER baz 0 * :bar
+insert line-client-msg : +12 ? :USER foofoo 0 * :foo foo
insert line-client-msg : +13 ? :NICK :foo
insert lines-ping-pong : +14 ?? :0
insert lines-ping-pong : +16 ?? :1
insert ./lib/cap-msg
insert ./lib/cmd-disconnect
# for cmd-disconnect-0, cmd-disconnect-1
-insert ./lib/conn
-# for: attempting, connected
+insert ./lib/connect-w-password
+# for: attempting-to-connected-w-password, connect-w-password
insert ./lib/disconnect
# for: disconnect1
insert ./lib/req-sasl
× connecting-to-nick
> /reconnect
-insert attempting :-1 + foo.bar.baz=STORE bar=foo baz=foo STORE :foo.bar.baz
-log 2 $ - password: foo
-insert connected : + WIN_IDS=2 baz=foo bar :foo
+insert attempting-to-connected-w-password : + SECRET=foo WIN_IDS :2
× cap-to-auth
insert get-sasl-plain
× ×-------------------------------------
-> /connect foo.bar.baz:6697 foo:foo foo:foo
-insert connect 1: + [bar]=[foo] [baz] :[foo]
-log 1 $ password set to: [foo]
+insert connect-w-password : + SECRET :foo
# check not setting any user data, going straight to disconnect once possible
insert connecting-to-nick 1:
insert connecting-to-nick
#
insert cmd-disconnect-0 :-2 + ~baz@baz.bar.foo :~foo@foo.foo
-insert user-set-to : + USER_ID=me USERNICK=foo USERNAME=~foo USERHOST :foo.foo
+insert user-set-to : + USER_ID=me USERNICK=foo USERNAME=~foofoo USERHOST :foo.foo
insert cmd-disconnect-0 -2: + ~baz@baz.bar.foo :~foo@foo.foo
insert cmd-disconnect-1 :-1
insert disconnect1 1: + WIN_IDS :2
# check receiving nickname during set-up, other stuff only via QUIT message
# check immediate
insert connecting-to-nick
-insert cap-msg : +0 CAPMSG :* LS :
+insert cap-msg : + CAPMSG :* LS :
log 1 > CAP :LIST
-insert cap-msg : +0 CAPMSG :foo LIST :
+insert cap-msg : + CAPMSG :foo LIST :
insert user-set-to :1 + USER_ID=me USERNICK :foo
log 1 > CAP :END
#
insert cmd-disconnect-0 :-2 + ~baz@baz.bar.foo :~foo@foo.foo
-insert user-set-to 1: + USER_ID=me USERNAME=~foo USERHOST :foo.foo
+insert user-set-to 1: + USER_ID=me USERNAME=~foofoo USERHOST :foo.foo
insert cmd-disconnect-0 -2: + ~baz@baz.bar.foo :~foo@foo.foo
insert cmd-disconnect-1 :-1
insert disconnect1 1: + WIN_IDS :2
insert end-auth : + NUMERIC=904 SASL_STATE :failed
#
insert cmd-disconnect-0 :-2 + ~baz@baz.bar.foo :~foo@foo.foo
-insert user-set-to 1: + USER_ID=me USERNAME=~foo USERHOST :foo.foo
+insert user-set-to 1: + USER_ID=me USERNAME=~foofoo USERHOST :foo.foo
insert cmd-disconnect-0 -2: + ~baz@baz.bar.foo :~foo@foo.foo
insert cmd-disconnect-1
insert disconnect1 1:-1 + WIN_IDS :2
insert end-auth : + NUMERIC=903 SASL_STATE :successful
# check tilde addition and MODE setting
-insert servermsglogged : +0 MSG ::foo!~foo@foo.foo MODE foo +aBc
+insert servermsglogged : + MSG ::foo!~foo@foo.foo MODE foo +aBc
log 1 $ users:me:user set to: [~foo]
log 1 $ users:me:modes set to: [Bac]
-insert servermsglogged : +0 MSG ::foo!~foo@foo.foo MODE foo -cba
+insert servermsglogged : + MSG ::foo!~foo@foo.foo MODE foo -cba
log 1 $ users:me:modes set to: [B]