Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
### Fixed
- Render the empty tag expression as an empty string ([#222](https://github.com/cucumber/tag-expressions/pull/222))
- Improve error message for missing operands ([#221](https://github.com/cucumber/tag-expressions/pull/221))

## [8.0.0] - 2025-10-14
Expand Down
2 changes: 1 addition & 1 deletion go/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,5 +284,5 @@ func (t *trueExpr) Evaluate(variables []string) bool {
}

func (t *trueExpr) ToString() string {
return "true"
return ""
}
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ public boolean evaluate(List<String> variables) {

@Override
public String toString() {
return "true";
return "";
}
}
}
2 changes: 1 addition & 1 deletion javascript/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,6 @@ class True implements Node {
}

public toString() {
return 'true'
return ''
}
}
2 changes: 1 addition & 1 deletion perl/lib/Cucumber/TagExpressions/Node.pm
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ An instance of one of the other node class types.
sub stringify {
my ( $self ) = @_;

return 'true' if not defined $self->sub_expression;
return '' if not defined $self->sub_expression;
return $self->sub_expression->stringify;
}
}
Expand Down
2 changes: 1 addition & 1 deletion php/src/Expression/TrueExpression.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ public function evaluate(array $variables): bool

public function __toString(): string
{
return 'true';
return '';
}
}
2 changes: 1 addition & 1 deletion python/src/cucumber_tag_expressions/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def evaluate(self, values):
return True

def __str__(self):
return "true"
return ""

def __repr__(self):
return "True_()"
2 changes: 1 addition & 1 deletion ruby/lib/cucumber/tag_expressions/expressions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def evaluate(_variables)
end

def to_s
'true'
''
end
end
end
Expand Down
8 changes: 8 additions & 0 deletions testdata/evaluations.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
- expression: ''
tests:
- variables: []
result: true
- variables: ['x']
result: true
- variables: ['y']
result: true
- expression: 'not x'
tests:
- variables: ['x']
Expand Down
2 changes: 1 addition & 1 deletion testdata/parsing.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- expression: ''
formatted: 'true'
formatted: ''
- expression: 'a and b'
formatted: '( a and b )'
- expression: 'a or b'
Expand Down
Loading