Files
BiliDown/internal/util/util_test.go
T
yw1573 dd8eaef97d refactor: restructure project to standard Go layout
- Reorganize code into cmd/bilidown and internal/ packages
- Rename client/ to web/ for frontend source
- Remove systray dependency for headless web service
- Embed static files into binary using go:embed
- Update import paths to use internal/ prefix
- Update .gitignore with common patterns

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-02 17:21:49 +08:00

30 lines
497 B
Go

package util_test
import (
"fmt"
"os"
"testing"
"bilidown/common"
"bilidown/util"
)
func TestRandomString(t *testing.T) {
for i := 4; i < 10; i++ {
for j := 0; j < 3; j++ {
str := common.RandomString(i)
t.Log(str)
}
t.Log("\n")
}
}
func TestGetRedirectedLocation(t *testing.T) {
os.Setenv("https_proxy", "http://192.168.1.5:9000")
if location, err := util.GetRedirectedLocation("https://b23.tv/Ga6sbzT"); err != nil {
t.Error(err)
} else {
fmt.Println(location)
}
}