* def response = ["-1302.3000","110992.2204","-3990.6580","-7678.6279","4964.0000","3415.6366"]
* def val = '-1302.3'
Then match response contains "#regex ." + val + ".*"
错误:- 匹配失败:CONTAINS $ | 不是字符串 (LIST:STRING) ["-1302.3000","110992.2204","-3990.6580","-7678.6279","4964.0000","3415.6366"] '#regex .-3'#regex .-3'
这适用于最新版本的空手道 (1.1.0)
* def response = ["-1302.3000","110992.2204","-3990.6580","-7678.6279","4964.0000","3415.6366"]
* def val = '-1302.3'
* match response contains "#regex " + val + ".*"
也就是说,请参阅下面的建议:
* def response = ["-1302.3000","110992.2204","-3990.6580","-7678.6279","4964.0000","3415.6366"]
* def numbers = response.map(x => x * 1)
* match numbers contains -1302.3
我把它作为作业让你了解它是如何工作的。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句