✨ 文件301直链与password文件隐藏
This commit is contained in:
@@ -5,10 +5,11 @@ import (
|
||||
"github.com/Xhofe/alist/alidrive"
|
||||
"github.com/Xhofe/alist/bootstrap"
|
||||
"github.com/Xhofe/alist/conf"
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func init() {
|
||||
func setup() {
|
||||
bootstrap.InitLog()
|
||||
bootstrap.ReadConf("../conf.yml")
|
||||
bootstrap.InitClient()
|
||||
@@ -37,4 +38,10 @@ func TestGet(t *testing.T) {
|
||||
file,err:=alidrive.GetFile("5fb7c80e85e4f335cd344008be1b1b5349f74414")
|
||||
fmt.Println(err)
|
||||
fmt.Println(file)
|
||||
}
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
setup()
|
||||
code:=m.Run()
|
||||
os.Exit(code)
|
||||
}
|
13
test/string_test.go
Normal file
13
test/string_test.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestSplit(t *testing.T) {
|
||||
drive_id:="/123/456"
|
||||
strs:=strings.Split(drive_id,"/")
|
||||
fmt.Println(strs)
|
||||
}
|
Reference in New Issue
Block a user