test(change): change test code

This commit is contained in:
eson 2020-11-25 12:25:19 +08:00
parent 3275ec2609
commit 3d087de12e
2 changed files with 5 additions and 4 deletions

View File

@ -100,7 +100,7 @@ func (l *Label) SetContentConditionFromFile(jsScriptFile string) {
} }
l.conditionlock.Lock() l.conditionlock.Lock()
defer l.conditionlock.Unlock() defer l.conditionlock.Unlock()
log.Println(string(data)) // log.Println(string(data))
l.conditionJS = string(data) l.conditionJS = string(data)
} }

View File

@ -17,13 +17,14 @@ func TestPort(t *testing.T) {
log.Println(cxt.TaskID, cxt.Content, cxt.Carry) log.Println(cxt.TaskID, cxt.Content, cxt.Carry)
} }
}) })
ltest.SetContentConditionFromFile("example.js") ltest.SetContentConditionFromFile("example.js")
cli.Connect() cli.Connect()
log.Println(ltest.Open("https://playerduo.com/api/playerDuo-service-v2/rip113?lang=en&deviceType=browser", nil)) // log.Println(ltest.Open("https://playerduo.com/api/playerDuo-service-v2/rip113?lang=en&deviceType=browser", nil))
log.Println(ltest.Open("https://playerduo.com/api/playerDuo-service-v2/yanngu?lang=en&deviceType=browser", "213")) // log.Println(ltest.Open("https://playerduo.com/api/playerDuo-service-v2/yanngu?lang=en&deviceType=browser", "213"))
// log.Println(ltest.Open("https://playerduo.com/api/playerDuo-service-v2/rip113?lang=en&deviceType=browser")) // log.Println(ltest.Open("https://playerduo.com/api/playerDuo-service-v2/rip113?lang=en&deviceType=browser"))
// log.Println(ltest.Open("https://playerduo.com/api/playerDuo-service-v2/yanngu?lang=en&deviceType=browser")) // log.Println(ltest.Open("https://playerduo.com/api/playerDuo-service-v2/yanngu?lang=en&deviceType=browser"))
http.ListenAndServe(":42311", nil) http.ListenAndServe(":4233", nil)
} }
func TestChrome(t *testing.T) { func TestChrome(t *testing.T) {