1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-01-06 09:15:37 -05:00

more test cases

This commit is contained in:
Darien Raymond
2017-12-18 00:07:50 +01:00
parent 88b81a0d29
commit a0b2c285b2
3 changed files with 57 additions and 0 deletions

View File

@@ -54,3 +54,16 @@ func TestGetAssetLocation(t *testing.T) {
os.Setenv("v2ray.location.asset", "/v2ray")
assert(GetAssetLocation("t"), Equals, "/v2ray/t")
}
func TestGetPluginLocation(t *testing.T) {
assert := With(t)
exec, err := os.Executable()
assert(err, IsNil)
loc := GetPluginDirectory()
assert(loc, Equals, filepath.Join(filepath.Dir(exec), "plugins"))
os.Setenv("V2RAY_LOCATION_PLUGIN", "/v2ray")
assert(GetPluginDirectory(), Equals, "/v2ray")
}