Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
29880be2
Unverified
Commit
29880be2
authored
Nov 25, 2022
by
boojack
Committed by
GitHub
Nov 25, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update tests (#572)
parent
f4e2b731
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
html_meta_test.go
plugin/http_getter/html_meta_test.go
+0
-6
tag_test.go
server/tag_test.go
+8
-0
No files found.
plugin/http_getter/html_meta_test.go
View file @
29880be2
...
@@ -11,12 +11,6 @@ func TestGetHTMLMeta(t *testing.T) {
...
@@ -11,12 +11,6 @@ func TestGetHTMLMeta(t *testing.T) {
urlStr
string
urlStr
string
htmlMeta
HTMLMeta
htmlMeta
HTMLMeta
}{
}{
{
urlStr
:
"https://baidu.com"
,
htmlMeta
:
HTMLMeta
{
Title
:
"百度一下,你就知道"
,
},
},
{
{
urlStr
:
"https://www.bytebase.com/blog/sql-review-tool-for-devs"
,
urlStr
:
"https://www.bytebase.com/blog/sql-review-tool-for-devs"
,
htmlMeta
:
HTMLMeta
{
htmlMeta
:
HTMLMeta
{
...
...
server/tag_test.go
View file @
29880be2
...
@@ -29,6 +29,14 @@ func TestFindTagListFromMemoContent(t *testing.T) {
...
@@ -29,6 +29,14 @@ func TestFindTagListFromMemoContent(t *testing.T) {
memoContent
:
"#tag1 #tag2
\n
#tag3 #tag4 "
,
memoContent
:
"#tag1 #tag2
\n
#tag3 #tag4 "
,
want
:
[]
string
{
"tag1"
,
"tag2"
,
"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
{
for
_
,
test
:=
range
tests
{
result
:=
findTagListFromMemoContent
(
test
.
memoContent
)
result
:=
findTagListFromMemoContent
(
test
.
memoContent
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment