我可以在specflow(或小黄瓜)中逃脱管道吗? [英] Can I escape the pipe in specflow (or gherkin)

查看:82
本文介绍了我可以在specflow(或小黄瓜)中逃脱管道吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个specflow步骤表,我想将 | (管道)字符作为内容的一部分。

I've got a specflow step table that I want to have the | (pipe) character as a part of the content.

示例:

Then the data should be
    | Field     | Value  |
    | SomeField | a|b|c  |

但这不起作用。

推荐答案

Bah。我不敢相信我以前没有找到这个。您可以使用反斜杠对管道进行转义,但是specflow语法突出显示器对此感到困惑。

Bah. I can't believe I didn't find this earlier. You CAN escape a pipe with the backslash, but the specflow syntax highlighter gets confused by it.

Then the data should be
    | Field     | Value    |
    | SomeField | a\|b\|c  |

这篇关于我可以在specflow(或小黄瓜)中逃脱管道吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆