mirror of
https://github.com/AlistGo/alist.git
synced 2025-04-25 14:54:03 +08:00
25 lines
403 B
Go
25 lines
403 B
Go
package common
|
|
|
|
import "testing"
|
|
|
|
func TestIsApply(t *testing.T) {
|
|
datas := []struct {
|
|
metaPath string
|
|
reqPath string
|
|
applySub bool
|
|
result bool
|
|
}{
|
|
{
|
|
metaPath: "/",
|
|
reqPath: "/test",
|
|
applySub: true,
|
|
result: true,
|
|
},
|
|
}
|
|
for i, data := range datas {
|
|
if IsApply(data.metaPath, data.reqPath, data.applySub) != data.result {
|
|
t.Errorf("TestIsApply %d failed", i)
|
|
}
|
|
}
|
|
}
|