使用 JRuby 的 Cucumber 的奇怪输出
我正在使用 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
输出中带有箭头和方括号的数字是什么? 我该如何摆脱它们?
I am using JRuby 1.6.3 with Cucumber 1.0.2. When I run my feature (jruby -S cucumber features\add_two_numbers.feature) I am getting:
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
What are those numbers with arrow and square bracet in the output?
How do I get rid of them?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这些代码在输出中启用颜色,但看起来您的系统由于某种原因不支持它们。您可以使用 --no-color 选项禁用它。
These codes enable color in the output, but it looks like your system doesn't support them for some reason. You can disable it with the --no-color option.
使用此
--monochrome
而不是--no-color
对于 ant build jvn arg 添加类似< /code>
否则添加相同的
@CucumberOptions("--monochrome")
use this
--monochrome
instead of--no-color
For ant build jvn arg add like
<arg value="--monochrome"/>
else add the same with
@CucumberOptions("--monochrome")