aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2019-01-15 19:37:27 +0700
committerShulhan <ms@kilabit.info>2019-01-15 19:37:27 +0700
commit6aef23da058f979d4a43565e11974e6f85ebfbd6 (patch)
treec00f61e29035f5a4e8e0e843cac09a21d1faee8e
parentcff4954bfc68c4d8d3215d814df14c2f6dfc9920 (diff)
downloadpakakeh.go-6aef23da058f979d4a43565e11974e6f85ebfbd6.tar.xz
lib/smtp: add unit test for command without CRLF
-rw-r--r--lib/smtp/command_test.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/smtp/command_test.go b/lib/smtp/command_test.go
index f7bc88e0..e4b54573 100644
--- a/lib/smtp/command_test.go
+++ b/lib/smtp/command_test.go
@@ -27,10 +27,14 @@ func TestUnpack(t *testing.T) {
expErr: errCmdUnknown,
}, {
desc: "With length too long",
- b: "VERIFY " + string(libbytes.Random(
+ b: "VRFY " + string(libbytes.Random(
[]byte(libbytes.ASCIILetters), 513)),
expErr: errCmdTooLong,
}, {
+ desc: "Without CRLF",
+ b: "VRFY local.part@domain",
+ expErr: errCmdSyntaxError,
+ }, {
desc: "DATA command",
b: "DATA\r\n",
expCmd: &Command{