You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat!: full support for cucumber expressions (#180)
* feat: full support for cucumber expressions
Fixes#178
* revert C++ standard to 20 and improve error handling in expression evaluation
* fix: remove unused print include from TestExpression.cpp
* try fix mac build
* fixing mac builds
* add unicode test
* refactor: remove unused regex includes and commented-out code
* feat: add error handling for optional and alternative expressions
* fix: add empty block comment for tuple step definition
* fix: mark NoEligibleParsers constructor as explicit
* feat: add InvalidTokenType exception for better error handling
* fix: correct move semantics for stepRegexStr in StepMatch constructor
* feat: add InvalidNodeType exception and refactor regex handling in Expression class
* refactor: improve parameter passing in ExpressionParser and SubParser methods
* refactor: change character type from char to unsigned char in Token methods for consistency
* fix: include ParameterRegistry header and update converter initialization in Expression class
* refactor: rename InHelper to MatchTokenHelper for clarity and consistency
* refactor: update Node and Token classes for improved encapsulation and consistency
* refactor: simplify Result construction in ExpressionParser methods for clarity
* fix: remove redundant check for line start and end tokens in ParseTokensUntil method
* refactor: enhance Converter constructor for improved clarity and functionality
* refactor: update parser state references for consistency and clarity
* refactor: remove default constructor from ExpressionTokenizer
* fix: update PatternVisitor usage in StepRegistry and remove unused visitor instances in Matcher
* fix: replace 'and' with '&&' for logical operation in ExpressionTokenizer
* refactor: simplify empty expression handling in ExpressionTokenizer
* refactor: update ParseTokensUntil and ParseToken signatures for consistency
* refactor: update Converter constructor signature for consistency
* fix: update ccache key and add crt-version to get-winsdk.sh for consistency
* refactor: update HookExecutor and TestExecution to use optional scopes for feature and scenario starts
* test: test cucumber expressions against official test input files
* fix: update YAML file loading to use string path for consistency
* refactor: update GetTestData function to use std::filesystem::path for improved path handling
* fix: add missing custom command to copy testdata directory for cucumber expression tests
* refactor: remove debug output from parameter registry match function
* fix: add const qualifier to ParseBetweenGenerator method for consistency
* fix: rename variables for clarity and consistency in ExpressionTokenizer
* fix: correct text parameter passing in MatchVisitor to avoid unnecessary move
* fix: remove unnecessary semicolon and improve error message in StringTo function
* fix: remove ContextManager parameter from FeatureStart and ScenarioStart methods for cleaner interface
* fix: correct ignore list in .ls-lint.yml for accurate linting configuration
* fix: add megalinter-reports to ignore list for improved linting configuration
* fix: add excluded directories to .mega-linter.yml for improved linting configuration
* test: add boolean matching tests to TestExpression for improved coverage
* fix: remove debug output from TestExpressionParser for cleaner test output
* test: add Token::NameOf tests for comprehensive coverage in TestExpressionTokenizer
* fix: update .mega-linter.yml to disable REPOSITORY_CHECKOV linter
* fix: add testdata directory to excluded directories in .mega-linter.yml
* fix: update BODY macro to use static_cast for function pointer type in Execute method
* refactor: integrate StepRegistry and FeatureTreeFactory into Application and TestRunner implementations
* refactor: replace std::int64_t with std::int32_t in ParameterRegistry and related steps
* fix: remove commented out add_subdirectory for test_helper in CMakeLists.txt
* fix: improve error message formatting and add test for unknown parameter type
* refactor: improve formatting of error struct definitions for better readability
* fix: optimize match iteration logic in Expression class
* refactor: rename methods for clarity and consistency in Expression class
* chore: only execute hooks when there was no failure previously
* feat: add CurrentContext method to ScopedFeatureContext and ExecutionStatus methods to ProgramScope and FeatureScope
* chore: remove unneccsary complexity
* chore: remove unused includes and commented code in HookExecutor
* refactor: add HasSetUpTearDown concept
* refactor: change FeatureTreeFactory and Application methods to use const references
* feat: enhance error handling in Application and add overloaded GetExitCode method
* refactor: use const references for MatchRange in converter functions
* feat: improve error handling in Application and FeatureFactory with specific exceptions
* refactor: remove unused executeHooks member from ScopedHook
* fix: correct path conversion in UnsupportedAsteriskError exception
* fix: simplify exception handling in CreateStepInfo method
* refactor: consolidate error handling by replacing InternalError with Errors.hpp
* refactor: remove unused functions
Copy file name to clipboardExpand all lines: cucumber_cpp/acceptance_test/test.bats
+8-2Lines changed: 8 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -181,7 +181,13 @@ teardown() {
181
181
@test "Test error program hook results in error and skipped steps" {
182
182
run .build/Host/cucumber_cpp/acceptance_test/Debug/cucumber_cpp.acceptance_test.custom run --feature cucumber_cpp/acceptance_test/features --tag "@smoke and @result:OK" --report console --required --failprogramhook
183
183
assert_failure
184
-
assert_output --partial "skipped Given a given step"
184
+
refute_output --partial "skipped Given a given step"
185
185
refute_output --partial "should not be executed"
186
-
# assert_output --partial "tests : 0/1 passed"
186
+
assert_output --partial "tests : 0/0 passed"
187
+
}
188
+
189
+
@test "Test unicode" {
190
+
run .build/Host/cucumber_cpp/acceptance_test/Debug/cucumber_cpp.acceptance_test run --feature cucumber_cpp/acceptance_test/features --tag "@unicode" --report console
0 commit comments