我想使用像'''text'''这样的标记(格式文本为粗体)来格式化Fitnesse测试表中的文本,以便在复杂的设置中显示,测试哪些特定值。
示例:如果我有这样的测试表
|query|load and check age of person| |name |age | |Peter|'''40''' |我将“40”作为粗体文本,这就是我想要的。 但是当我运行测试时,我得到一个错误,并说出结果
[40] expected [40]在那张桌子里面。 如果我使用例如css类,也会发生同样的情况
!style_red[40]有没有办法在不破坏测试的情况下格式化文本?
I want to use markup like '''text''' (format text as bold) to format text inside a Fitnesse test table to show in a complex setup, which specific values are tested.
Example: If I have a test table like this
|query|load and check age of person| |name |age | |Peter|'''40''' |I get "40" as bold text, which is what I want. But when I run the test I get an error, saying for the result
[40] expected [40]inside that table. The same happens if I use css classes with e.g.
!style_red[40]Is there a way to do format text, without breaking the tests?
最满意答案
我所知道的唯一方法是在代码中执行此操作(在执行实际比较操作之前删除HTML标记)。
The only way I'm aware of is to do this in code (removing the HTML tags before doing the actual compare operation).
更多推荐
发布评论