2

我将 JRuby 1.6.3 与 Cucumber 1.0.2 一起使用。当我运行我的功能(jruby -S cucumber features\add_two_numbers.feature)时,我得到:

Feature: Add two numbers
In order to add not have to use my head
I want to add two numbers
Scenario: Add two numbers←[90m        # features\add_two_numbers.feature:7←[0m

←[32mGiven I have a calculator←[90m      # features/steps/calculator_steps.rb:11←[0m←[0m
←[32mWhen I add the numbers ←[32m←[1m1←[0m←[0m←[32m and ←[32m←[1m2←[0m←[0m←[32m←[90m#features/steps/calculator_steps.rb:18←[0m←[0m
←[32mThen I get ←[32m←[1m3←[0m←[0m←[32m←[90m                   # features/steps/calculator_steps.rb:25←[0m←[0m
1 scenario (←[32m1 passed←[0m)
3 steps (←[32m3 passed←[0m)
0m0.043s

输出中带有箭头和方括号的数字是什么?我该如何摆脱它们?

4

2 回答 2

1

这些代码在输出中启用颜色,但看起来您的系统由于某种原因不支持它们。您可以使用 --no-color 选项禁用它。

于 2011-08-24T23:17:42.320 回答
0

用这个--monochrome代替--no-color

对于 ant build jvn arg 添加类似<arg value="--monochrome"/>

否则添加相同的@CucumberOptions("--monochrome")

于 2016-08-09T10:55:49.780 回答