]> git.giacomolli.uk - onechat/blobdiff - stop_test.go
Order functions by their first use
[onechat] / stop_test.go
index 1f87beaa088e297c4e317071eac8a5400e322b04..82ae7959b743573ed3bd7496cca70a60c6066a6a 100644 (file)
@@ -14,25 +14,25 @@ func TestStopNameReadsTheNameOfASubagent(t *testing.T) {
                agent string
        }{
                {
                agent string
        }{
                {
-                       name:  "a name after the command",
+                       name:  "reads the name after the stop command",
                        line:  " /stop GreenOtter ",
                        found: true,
                        agent: "GreenOtter",
                },
                {
                        line:  " /stop GreenOtter ",
                        found: true,
                        agent: "GreenOtter",
                },
                {
-                       name: "the command alone",
+                       name: "finds no subagent name after the bare command",
                        line: "/stop",
                },
                {
                        line: "/stop",
                },
                {
-                       name: "the command with spaces only",
+                       name: "finds no subagent name in trailing spaces",
                        line: "/stop   ",
                },
                {
                        line: "/stop   ",
                },
                {
-                       name: "a word that starts with the command",
+                       name: "rejects a command joined to its name",
                        line: "/stopGreenOtter",
                },
                {
                        line: "/stopGreenOtter",
                },
                {
-                       name: "a message",
+                       name: "leaves a mention of the command as text",
                        line: "please /stop GreenOtter",
                },
        }
                        line: "please /stop GreenOtter",
                },
        }