From 29880be2834b4b584198fde5ff9c952037d823c4 Mon Sep 17 00:00:00 2001 From: boojack Date: Fri, 25 Nov 2022 21:51:53 +0800 Subject: [PATCH] chore: update tests (#572) --- plugin/http_getter/html_meta_test.go | 6 ------ server/tag_test.go | 8 ++++++++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/plugin/http_getter/html_meta_test.go b/plugin/http_getter/html_meta_test.go index 0c0e6013..31920eac 100644 --- a/plugin/http_getter/html_meta_test.go +++ b/plugin/http_getter/html_meta_test.go @@ -11,12 +11,6 @@ func TestGetHTMLMeta(t *testing.T) { urlStr string htmlMeta HTMLMeta }{ - { - urlStr: "https://baidu.com", - htmlMeta: HTMLMeta{ - Title: "百度一下,你就知道", - }, - }, { urlStr: "https://www.bytebase.com/blog/sql-review-tool-for-devs", htmlMeta: HTMLMeta{ diff --git a/server/tag_test.go b/server/tag_test.go index 0d0fa982..8762356f 100644 --- a/server/tag_test.go +++ b/server/tag_test.go @@ -29,6 +29,14 @@ func TestFindTagListFromMemoContent(t *testing.T) { memoContent: "#tag1 #tag2 \n#tag3 #tag4 ", want: []string{"tag1", "tag2", "tag3", "tag4"}, }, + { + memoContent: "#tag1 123123#tag2 \n#tag3 #tag4 ", + want: []string{"tag1", "tag3", "tag4"}, + }, + { + memoContent: "#tag1 http://123123.com?123123#tag2 \n#tag3 #tag4 http://123123.com?123123#tag2) ", + want: []string{"tag1", "tag3", "tag4"}, + }, } for _, test := range tests { result := findTagListFromMemoContent(test.memoContent)