From c9253c1a8ac54bea1bdbd67373b0601d7a616ea0 Mon Sep 17 00:00:00 2001 From: jinnrry Date: Sun, 3 Nov 2024 15:23:31 +0800 Subject: [PATCH] fix --- server/pop3_server/action_test.go | 106 +++++++++++++++--------------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/server/pop3_server/action_test.go b/server/pop3_server/action_test.go index 581cdc4..a65d339 100644 --- a/server/pop3_server/action_test.go +++ b/server/pop3_server/action_test.go @@ -1,55 +1,55 @@ package pop3_server -import ( - "bytes" - "fmt" - "github.com/Jinnrry/gopop" - "github.com/Jinnrry/pmail/config" - "github.com/Jinnrry/pmail/db" - "github.com/Jinnrry/pmail/utils/context" - "github.com/emersion/go-message/mail" - "io" - "testing" -) - -func Test_action_Retr(t *testing.T) { - config.Init() - db.Init("") - - a := action{} - session := &gopop.Session{ - Ctx: &context.Context{ - UserID: 1, - }, - } - got, got1, err := a.Retr(session, 301) - - _, _, _ = got, got1, err -} - -func Test_email(t *testing.T) { - var b bytes.Buffer - - // Create our mail header - var h mail.Header - - // Create a new mail writer - mw, _ := mail.CreateWriter(&b, h) - - // Create a text part - tw, _ := mw.CreateInline() - - var html mail.InlineHeader - - html.Header.Set("Content-Transfer-Encoding", "base64") - w, _ := tw.CreatePart(html) - - io.WriteString(w, "=") - - w.Close() - - tw.Close() - - fmt.Printf("%s", b.String()) - -} +//import ( +// "bytes" +// "fmt" +// "github.com/Jinnrry/gopop" +// "github.com/Jinnrry/pmail/config" +// "github.com/Jinnrry/pmail/db" +// "github.com/Jinnrry/pmail/utils/context" +// "github.com/emersion/go-message/mail" +// "io" +// "testing" +//) +// +//func Test_action_Retr(t *testing.T) { +// config.Init() +// db.Init("") +// +// a := action{} +// session := &gopop.Session{ +// Ctx: &context.Context{ +// UserID: 1, +// }, +// } +// got, got1, err := a.Retr(session, 301) +// +// _, _, _ = got, got1, err +//} +// +//func Test_email(t *testing.T) { +// var b bytes.Buffer +// +// // Create our mail header +// var h mail.Header +// +// // Create a new mail writer +// mw, _ := mail.CreateWriter(&b, h) +// +// // Create a text part +// tw, _ := mw.CreateInline() +// +// var html mail.InlineHeader +// +// html.Header.Set("Content-Transfer-Encoding", "base64") +// w, _ := tw.CreatePart(html) +// +// io.WriteString(w, "=") +// +// w.Close() +// +// tw.Close() +// +// fmt.Printf("%s", b.String()) +// +//}