引用里面的引用,然后我应该看到黄瓜 prolmem 导轨
我可以在浏览器中清楚地看到文本。
characters should be "R", "P", or "B".
但是,当我写一个步骤黄瓜步骤时,
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
为什么黄瓜不识别此步骤?
还是引用内引用的转义问题?
谢谢
I can clearly see the text in browser.
characters should be "R", "P", or "B".
But when I write a step a cucumber step
Then I should see "characters should be \"R\", \"P\", or \"B\"."
It says its
Undefined step: "I should see "characters should be \"R\", \"P\", or \"B\"."" (Cucumber::Undefined)
and says to define the step as
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
Why is cucumber not recognizing this step?
Or is it the escaping problem of the quote inside quote?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Pystring 可能会起作用。使用三个双引号将整行表示为字符串。
黄瓜步骤
步骤定义
A Pystring might work. Use three doublequotes to indicate an entire line as a string.
Cucumber step
Step definition