home · contact · privacy
Some tests refactoring. master
authorChristian Heller <c.heller@plomlompom.de>
Wed, 3 Dec 2025 17:36:27 +0000 (18:36 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Wed, 3 Dec 2025 17:36:27 +0000 (18:36 +0100)
26 files changed:
src/tests/_timeout_retries.test
src/tests/channels.test
src/tests/config.test
src/tests/config.toml
src/tests/connect_disconnect_legalities.test
src/tests/error_disconnects.test
src/tests/isupports.test
src/tests/lib/001-setting-nick
src/tests/lib/attempting [new file with mode: 0644]
src/tests/lib/attempting-to-connected
src/tests/lib/cmd-disconnect
src/tests/lib/conn [deleted file]
src/tests/lib/connect [new file with mode: 0644]
src/tests/lib/connect-to-connected
src/tests/lib/connect-w-password [new file with mode: 0644]
src/tests/lib/connected [new file with mode: 0644]
src/tests/lib/error-to-disconnect
src/tests/lib/error-to-disconnected
src/tests/lib/join-empty
src/tests/lib/no-timely-pong
src/tests/lib/part
src/tests/lib/usermode
src/tests/pingpong.test
src/tests/test.test
src/tests/tui_draw.test
src/tests/userset.test

index 32ace8f207e45bb09f8f45bdaee09fc073e69b88..7801288c68b7bf6574d9706f18116dcbd6640125 100644 (file)
@@ -1,7 +1,7 @@
 insert ./lib/001-to-usermode
 insert ./lib/001-to-usermode
+insert ./lib/attempting
 insert ./lib/attempting-to-connected
 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
 insert ./lib/cmd-disconnect
 # for: cmd-disconnect
 insert ./lib/disconnect
@@ -13,29 +13,29 @@ insert ./lib/trigger-ping
 
 × fake-testing-timeout
 log 1 $ connection_state set to: [failed to connect: FAKE TESTING TIMEOUT]
 
 × 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
 
 × 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 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]
 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
 
 × ×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
 
 # 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
 
 # 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
 
 # check connecting works with TestingClient port finally reduced to 10000,
 # and retry chain also started by in-connection timeout
@@ -51,11 +51,11 @@ wait 2
 > /reconnect
 insert attempting-to-connected-plus-timeout
 > /reconnect
 > /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
 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
 wait 2
index 5099772feb55e17e49a8c9c135894ece32397447..0ff910babc3fc5e44c13cd0c8ecc25bca44fc02d 100644 (file)
@@ -21,39 +21,35 @@ insert ./lib/user-set-to
 insert ./lib/usermode
 
 × part-empty
 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
 
 × 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
 
 × 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 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
 
 
 × 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
 
 × 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 3 $ NICK VERB PREFIX
 
 × ×--------------------------
@@ -68,66 +64,66 @@ insert 001-to-usermode
 log 2 $ not sending, since not in channel
 
 # check join with minimum context (no topic, no other users etc.)
 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 /
 
 # 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
 
 # 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
 > 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
 
 # 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
 > /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 :
 
 # 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
 > /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
 
 # 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 =
 
 # 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
 
 # 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 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
 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
 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
 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
 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
 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 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
 log 3 $ residents: @baz, +oof, +rab, zab, foo
 
 # check server giving and taking membership prefixes
@@ -140,92 +136,92 @@ insert set-prefix : + MODESET=+o PREFIX=@ VERB=gains NICK=baz NEW_IDS :set to: [
 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 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 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 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 …
 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
 
 # … 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)
 
 # 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
 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 @
 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
 
 # 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
 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
 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
 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
 
 # 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
 
 # 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
 
 # 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
 
 # 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 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
 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 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 cmd-disconnect-1 :-1
 insert disconnect1 : + WIN_IDS :2,3,4
 
index b87aeedc5cbac3921dc0e7bcccab93e01ee82d07..0f4119cd015669672bebb147248082deddefd99d 100644 (file)
@@ -1,13 +1,8 @@
-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 # 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
index 362c1a3a04f61624bd895ad5a58b3295e288e06c..f1d0d697ef562d016e050b89cfd61b620a6e93fa 100644 (file)
@@ -4,8 +4,8 @@ to_highlight = ['quux']
 hostname = 'foo.bar.baz'
 nickname = 'foo'
 password = 'supersecret'
 hostname = 'foo.bar.baz'
 nickname = 'foo'
 password = 'supersecret'
-username = 'baz'
-realname = 'bar'
+username = 'foofoo'
+realname = 'foo foo'
 port = 1234
 channels = [
   '#test',
 port = 1234
 channels = [
   '#test',
index 6da0223a237f5bbd1858f50ba5a7b78c6d3aa522..c11de616dade7b8d8e5bcb6dcb022641eb9733d1 100644 (file)
@@ -22,7 +22,7 @@ log 1 $ not re-connecting since already connected
 
 # handle /disconnect on being connected
 insert cmd-disconnect :-1
 
 # 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
 
 # fail to disconnect when already disconnected
 > /disconnect
@@ -30,9 +30,9 @@ log 1 $ already disconnected and not attempting connect
 
 # succeed to re-connect after disconnect
 > /reconnect
 
 # 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
 
 # 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
 insert disconnect-to-stop-auto-reconnect
index b9c89cada5f77bc40b67b58ecb599f77b0872388..747640e66bb80c8d3cdac44eae6f98e91d507242 100644 (file)
@@ -8,8 +8,8 @@ insert ./lib/retry-in
 
 × reconnect-error-logged
 > /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
 
 × ×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
 
 
 × ×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
 
@@ -17,14 +17,14 @@ insert error-to-disconnected : +0 §§§ :XXX
 insert connect-to-connected
 
 # test default ERROR handling
 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
 
 # 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
index 3897a640b933eebb2c3a0ddbf6bbf11cf46cf13f..468d086084523afec779e2b42701cdffad68abbe 100644 (file)
@@ -13,20 +13,20 @@ insert ./lib/servermsglogged
 insert ./lib/user-set-to
 
 × un-default
 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
 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
 
 × 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
 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
 
 log 1 $ users:USER_ID:user set to: [~TO_CUT]
 log 9 < [NICKNAME] hi
 
@@ -41,66 +41,66 @@ insert caps-neg-empty
 insert 001-to-usermode
 
 # check setting of ISUPPORTs both with and without parameters, and last arg ignored
 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
 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 
 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
 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 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
 
 > /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 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
 
 # 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
 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
 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]
index 5151ef1b2c57bae86dbf6a74fda096d2c98f9e76..15c2879e9339f05448e251589dbeaa0fe6028df8 100644 (file)
@@ -2,5 +2,5 @@ insert ./lib/servermsglogged
 insert ./lib/user-set-to
 
 × 001-setting-nick
 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
diff --git a/src/tests/lib/attempting b/src/tests/lib/attempting
new file mode 100644 (file)
index 0000000..1b8f719
--- /dev/null
@@ -0,0 +1,8 @@
+× 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
+
index 68705a4325d2b4c62802cb1fced8dc61dbfc7a1c..cf9d3458f8a4912f1d6fd5839563a6dd4846a8a7 100644 (file)
@@ -1,5 +1,5 @@
-insert ./lib/conn
-# for: attempting, connected
+insert ./lib/attempting
+insert ./lib/connected
 
 × attempting-to-connected
 insert attempting
 
 × attempting-to-connected
 insert attempting
index 8ab7477915df1e001ed874c8a02aacb161e7c2f1..28e39b867075b0d14823b1713eabe42673ee5853 100644 (file)
@@ -5,9 +5,9 @@ insert ./lib/error-to-disconnect
 × cmd-disconnect-0
 > /disconnect
 log 1 > QUIT :ircplom says bye
 × 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 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)
 
 × cmd-disconnect-1
 insert error-to-disconnect : +0 ? ::Closing link: foo.foo (Client Quit)
diff --git a/src/tests/lib/conn b/src/tests/lib/conn
deleted file mode 100644 (file)
index e0b1052..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-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
diff --git a/src/tests/lib/connect b/src/tests/lib/connect
new file mode 100644 (file)
index 0000000..527d62a
--- /dev/null
@@ -0,0 +1,11 @@
+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]
index 3dc0eeec3cf94ffc6bf15ece5eee956e4128cc09..8d9892a241dae99ac8923b5be696f7c1d5736495 100644 (file)
@@ -1,7 +1,5 @@
 insert ./lib/attempting-to-connected
 insert ./lib/attempting-to-connected
-# for: attempting-to-connected
-insert ./lib/conn
-# for: connect
+insert ./lib/connect
 
 × connect-to-connected
 insert connect
 
 × connect-to-connected
 insert connect
diff --git a/src/tests/lib/connect-w-password b/src/tests/lib/connect-w-password
new file mode 100644 (file)
index 0000000..e194342
--- /dev/null
@@ -0,0 +1,17 @@
+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
diff --git a/src/tests/lib/connected b/src/tests/lib/connected
new file mode 100644 (file)
index 0000000..45ae99c
--- /dev/null
@@ -0,0 +1,7 @@
+× 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
+
index 00c853f9a88b738cbc3113636d51241b413e3918..d2dc9652424e96f0615a27fffe0e647ec5c8e8d5 100644 (file)
@@ -3,5 +3,5 @@ insert ./lib/disconnect
 insert ./lib/servermsglogged
 
 × error-to-disconnect
 insert ./lib/servermsglogged
 
 × error-to-disconnect
-insert servermsglogged : +0 MSG :ERROR :?
-insert disconnect0 : +1 EXIT_MSG :?
+insert servermsglogged : + MSG :ERROR :?
+insert disconnect0 : + EXIT_MSG :?
index 7126435398c4817080ef50390161124d65c96665..0dec882c9f1f37e5bad0498510f5a4ae3036ed82 100644 (file)
@@ -3,5 +3,5 @@ insert ./lib/disconnect
 insert ./lib/error-to-disconnect
 
 × error-to-disconnected
 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
index 3db819251b2fcf9a638a4e832a40cddac7beb2b7..69a94cc3594c22d14295551c010825c82c1fc860 100644 (file)
@@ -3,7 +3,7 @@ insert ./lib/servermsglogged
 × join-channel-0-0
 > /join CHANNEL
 log 1 > JOIN :CHANNEL
 × 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
 
 × join-channel-0-1
 insert servermsglogged : + MSG ::foo.bar.baz 353 foo = CHANNEL :RESIDENT_NAMES
@@ -17,6 +17,6 @@ insert servermsglogged : + MSG ::foo.bar.baz 366 foo CHANNEL :End of /NAMES list
 log 1 $ channels:CHANNEL:user_ids set to: RESIDENT_IDS
 
 × join-empty
 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
index 72bab471af88b0c9af9f8b4b05c9448f75275790..3fd4aa65fe079dc7ccade7735ea64ef9962b4981 100644 (file)
@@ -5,6 +5,6 @@ insert ./lib/retry-in
 × no-timely-pong
 servermsg 0 timeout
 servermsg 0 no timely PONG from server
 × 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
index e6b5e92a6867e679dd3ed7f7dc3f70a4dddab087..f0f07d4ee6dd8fc40af23fdcd2edde7807c0e6be 100644 (file)
@@ -1,20 +1,26 @@
 insert ./lib/servermsglogged
 
 × exit-channel
 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
 
 × 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 § : 
 
 × quits
 insert exit-channel : + exitTYPE=Q exitDESC=quits exitPREFIX=:§ exitMSG=Client§Quit § : 
index 27edba3802f5186d6b62d05b4928e9a9aca3c24f..958248e9b5f757419a6bdeb2ac130a3e60e6a3d6 100644 (file)
@@ -2,6 +2,6 @@ insert ./lib/servermsglogged
 insert ./lib/user-set-to
 
 × usermode
 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]
 log 1 $ users:me:modes set to: [ABC]
index 699edd33203236d2fbe45eab08beb333fdaf0fc1..171c4bc7fcdc789ee43d546cc2e4302bf4fabd60 100644 (file)
@@ -27,5 +27,5 @@ insert full-timeout
 # on re-connect, ensure timer cleared, i.e. only 2nd time-out will disconnect
 > /window 1
 > /reconnect
 # 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 full-timeout
index 51b90c1f6c7ca49eac3f38e76161a2abb7291fc2..3dca97369297407c84c73a141b09c704a86539ef 100644 (file)
@@ -2,8 +2,8 @@ insert ./lib/attempting-to-connected
 insert ./lib/cap-msg
 insert ./lib/cmd-disconnect
 insert ./lib/cmd-nick
 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
 insert ./lib/disconnect
 # for: disconnect0, disconnect1
 insert ./lib/disconnect-to-stop-auto-reconnect
@@ -13,7 +13,7 @@ insert ./lib/join-empty
 # for: join-channel-0, join-channel-1
 insert ./lib/no-handler
 insert ./lib/part
 # 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
 insert ./lib/pingpong
 insert ./lib/privmsg
 insert ./lib/req-sasl
@@ -35,7 +35,7 @@ log 1 > NICK :NAME_B
 # expect some NOTICE and PING to process/reply during initiation
 insert servernotice : + XXX :*** Looking up your ident...
 insert servernotice : + XXX :*** Looking up your hostname...
 # 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 ping-pong
 
 # handle 433
@@ -92,71 +92,71 @@ log 2 $ - (to this server) -
 insert servermsglogged : + MSG ::foo1 MODE foo1 :+Ziw
 log 1 $ users:me:modes set to: [Ziw]
 # handle bot query NOTICE
 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
 
 
 
 × 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 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
 
 # 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
 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
 
 # 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
 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
 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
 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 ::*.?.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 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
 
 # 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 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
 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
 log 1 $ users:1 deleted
 
 # handle lack of implementation
@@ -164,10 +164,10 @@ insert no-handler : + ALERT_WIN_IDS=2,3,4,5,6,7 ? :foo bar baz
 
 # handle /disconnect, clear all
 insert cmd-disconnect-0 :-1
 
 # 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 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
 
 log 1 $ motd emptied
 log 1 $ users cleared
 
@@ -178,24 +178,19 @@ log 6 $ cannot send, connection seems closed
 > /window 1
 > /privmsg barbar test
 log 1 $ cannot send, connection seems closed
 > /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
 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
 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
 log 0 # invalid prompt command: /join unknown
 insert enter-list-start
 log 0 #   1) foo.bar.baz:debug
@@ -231,7 +226,7 @@ log 1 #   /window.reconnect
 insert during_conn : + rename_win_ids :3
 
 # test setting up second client, but 432 irrecoverably
 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
 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
@@ -255,11 +250,9 @@ insert disconnect-to-stop-auto-reconnect : +10
 # 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
 # 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
 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 conn_init_2 2:
 insert during_conn : + rename_win_ids :3,6,7
index a3e80d41af3716d190cb8a2eb9c2ed9d25f945f0..af4f635ff407a4efb8602d1ff284ecfdb1dd1f99 100644 (file)
@@ -131,12 +131,12 @@ insert line-server-log : +3 ? :isupport:USERLEN set to: [10]
 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 : +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-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 line-client-msg : +13 ? :NICK :foo
 insert lines-ping-pong : +14 ?? :0
 insert lines-ping-pong : +16 ?? :1
index 028749af97e496cc9ea8494b047aae64b5693e3a..967044f239682bfffda211674c95d0a8dbce7f9b 100644 (file)
@@ -1,8 +1,8 @@
 insert ./lib/cap-msg
 insert ./lib/cmd-disconnect
 # for cmd-disconnect-0, cmd-disconnect-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
 insert ./lib/disconnect
 # for: disconnect1
 insert ./lib/req-sasl
@@ -12,9 +12,7 @@ insert ./lib/user-set-to
 
 × connecting-to-nick
 > /reconnect
 
 × 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
 
 × cap-to-auth
 insert get-sasl-plain
@@ -30,9 +28,7 @@ log 1 > CAP :END
 
 × ×-------------------------------------
 
 
 × ×-------------------------------------
 
-> /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:
 
 # check not setting any user data, going straight to disconnect once possible
 insert connecting-to-nick 1:
@@ -46,7 +42,7 @@ insert disconnect1 1:-1 + WIN_IDS :2
 insert connecting-to-nick
 #
 insert cmd-disconnect-0 :-2 + ~baz@baz.bar.foo :~foo@foo.foo
 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
 insert cmd-disconnect-0 -2: + ~baz@baz.bar.foo :~foo@foo.foo
 insert cmd-disconnect-1 :-1
 insert disconnect1 1: + WIN_IDS :2
@@ -54,14 +50,14 @@ insert disconnect1 1: + WIN_IDS :2
 # check receiving nickname during set-up, other stuff only via QUIT message
 # check immediate 
 insert connecting-to-nick
 # 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
 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 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 cmd-disconnect-0 -2: + ~baz@baz.bar.foo :~foo@foo.foo
 insert cmd-disconnect-1 :-1
 insert disconnect1 1: + WIN_IDS :2
@@ -72,7 +68,7 @@ insert cap-to-auth
 insert end-auth : + NUMERIC=904 SASL_STATE :failed
 #
 insert cmd-disconnect-0 :-2 + ~baz@baz.bar.foo :~foo@foo.foo
 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 cmd-disconnect-0 -2: + ~baz@baz.bar.foo :~foo@foo.foo
 insert cmd-disconnect-1
 insert disconnect1 1:-1 + WIN_IDS :2
@@ -88,8 +84,8 @@ log 1 $ sasl_account set to: [foo]
 insert end-auth : + NUMERIC=903 SASL_STATE :successful
 
 # check tilde addition and MODE setting
 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]
 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]
 log 1 $ users:me:modes set to: [B]