mirror of
				https://github.com/Jinnrry/PMail.git
				synced 2025-10-31 20:02:36 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			42 lines
		
	
	
		
			690 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			42 lines
		
	
	
		
			690 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package parsemail
 | |
| 
 | |
| import (
 | |
| 	"fmt"
 | |
| 	"os"
 | |
| 	"strings"
 | |
| 	"testing"
 | |
| )
 | |
| 
 | |
| func TestDecodeEmailContentFromTxt(t *testing.T) {
 | |
| 
 | |
| 	c, _ := os.ReadFile("../../docs/gmail/带附件带图片.txt")
 | |
| 
 | |
| 	r := strings.NewReader(string(c))
 | |
| 
 | |
| 	email := NewEmailFromReader(r)
 | |
| 
 | |
| 	fmt.Println(email)
 | |
| }
 | |
| 
 | |
| func TestDecodeEmailContentFromTxt3(t *testing.T) {
 | |
| 
 | |
| 	c, _ := os.ReadFile("../../docs/pmail/带附件.txt")
 | |
| 
 | |
| 	r := strings.NewReader(string(c))
 | |
| 
 | |
| 	email := NewEmailFromReader(r)
 | |
| 
 | |
| 	fmt.Println(email)
 | |
| }
 | |
| 
 | |
| func TestDecodeEmailContentFromTxt2(t *testing.T) {
 | |
| 	c, _ := os.ReadFile("../../docs/qqemail/带图片格式排版.txt")
 | |
| 
 | |
| 	r := strings.NewReader(string(c))
 | |
| 
 | |
| 	email := NewEmailFromReader(r)
 | |
| 
 | |
| 	fmt.Println(email)
 | |
| 
 | |
| }
 | 
