使用 JRuby 的 Cucumber 的奇怪输出

发布于 2024-12-01 09:25:53 字数 744 浏览 7 评论 0原文

我正在使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

绿萝 2024-12-08 09:25:53

这些代码在输出中启用颜色,但看起来您的系统由于某种原因不支持它们。您可以使用 --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.

浅语花开 2024-12-08 09:25:53

使用此 --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")

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文