Feature: Making Coffee
Scenario: Making a regular coffee
Given a machine filled with coffee beans
When a user makes a cup of coffee
Then the cup contains coffee
| Success | Failure
| 1 | 0 fee
So that leftover "fee" is the end of the feature name for that row, and the only thing that's odd is that for some reason, it's going back to the start of the line to write the other columns, instead of going to the appropriate column.
I added a second feature file as an experiment, and now I get:
| Success | Failure
| 1 | 0
| 0 | 1 Feature
Further investigation:
When I run Behavior's own tests on the same system, all tests pass.
Same results when running julia with --color=no
If I write my own code to set up some fake results and then run the same code the library is using, it renders it correctly:
julia> if true
# Setup:
using Behavior.Gherkin
using Behavior:
FeatureSuccessAndFailure
feature = Gherkin.Feature(FeatureHeader("Making Coffee", [], []), Scenario[])
results = [FeatureSuccessAndFailure(feature, 1, 0)]
# Code from Behavior, verbatim:
maxfeature = maximum(length(r.feature.header.description) for r in results)
featureprefix = " Feature: "
printstyled(" " ^ (length(featureprefix) + maxfeature + 1), "| Success | Failure\n"; color=:white)
for r in results
linecolor = r.n_failure == 0 ? :green : :red
printstyled(featureprefix, rpad(r.feature.header.description, maxfeature); color=linecolor)
printstyled(" | "; color=:white)
printstyled(rpad("$(r.n_success)", 7); color=:green)
printstyled(" | "; color=:white)
printstyled(rpad("$(r.n_failure)", 7), "\n"; color=linecolor)
end
end
| Success | Failure
Feature: Making Coffee | 1 | 0
For the tutorial's example...
What that table was supposed to look like:
So that leftover "fee" is the end of the feature name for that row, and the only thing that's odd is that for some reason, it's going back to the start of the line to write the other columns, instead of going to the appropriate column.
I added a second feature file as an experiment, and now I get:
Further investigation:
--color=no
If I write my own code to set up some fake results and then run the same code the library is using, it renders it correctly:
Versions in play: