gpt4 book ai didi

cucumber - 引用里面的引用然后我应该看到 cucumber prolmem rails

转载 作者:行者123 更新时间:2023-12-01 11:36:52 24 4
gpt4 key购买 nike

我可以清楚地看到浏览器中的文字。

characters should be "R", "P", or "B".

但是当我写一个 cucumber 步骤时

Then I should see "characters should be \"R\", \"P\", or \"B\"."

它说它

Undefined step: "I should see "characters should be \"R\", \"P\", or \"B\"."" (Cucumber::Undefined)

并说将步骤定义为

Then /^I should see "([^"]*)"R\\"([^"]*)"P\\"([^"]*)"B\\"([^"]*)"$/ do |arg1, arg2, arg3, arg4|
pending # express the regexp above with the code you wish you had
end

为什么 cucumber 不识别这一步?

还是quote inside quote的转义问题?

谢谢

最佳答案

Pystring 可能有用。使用三个双引号将整行指示为字符串。

cucumber 步

Then I should see
"""
characters should be "R", "P", or "B".
"""

步骤定义

Then /^I should see "([^"]*)"$/ do |string|
pending # express the regexp above with the code you wish you had
end

关于cucumber - 引用里面的引用然后我应该看到 cucumber prolmem rails,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4506653/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com