Skip to content

Tests: further Windows compatibility fixes#609

Draft
swissspidy wants to merge 4 commits intomainfrom
fix/windows
Draft

Tests: further Windows compatibility fixes#609
swissspidy wants to merge 4 commits intomainfrom
fix/windows

Conversation

@swissspidy
Copy link
Copy Markdown
Member

No description provided.

@github-actions github-actions bot added the bug label Mar 29, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Hello! 👋

Thanks for opening this pull request! Please check out our contributing guidelines. We appreciate you taking the initiative to contribute to this project.

Contributing isn't limited to just code. We encourage you to contribute in the way that best fits your abilities, by writing tutorials, giving a demo at your local meetup, helping other users with their support questions, or revising our documentation.

Here are some useful Composer commands to get you started:

  • composer install: Install dependencies.
  • composer test: Run the full test suite.
  • composer phpcs: Check for code style violations.
  • composer phpcbf: Automatically fix code style violations.
  • composer phpunit: Run unit tests.
  • composer behat: Run behavior-driven tests.

To run a single Behat test, you can use the following command:

# Run all tests in a single file
composer behat features/some-feature.feature

# Run only a specific scenario (where 123 is the line number of the "Scenario:" title)
composer behat features/some-feature.feature:123

You can find a list of all available Behat steps in our handbook.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request improves the cross-platform compatibility of the test suite by replacing inline wp eval commands with wp eval-file and switching from single to double quotes for command arguments in Behat feature files. These changes help avoid shell escaping issues, particularly on Windows. Feedback indicates that the transition to double quotes in features/post-block.feature was incomplete, as several instances (e.g., lines 1232 and 1248) were missed and should be updated for consistency.

Scenario: Check if a post has blocks
Given a WP install
When I run `wp post create --post_title='Block Post' --post_content='<!-- wp:paragraph --><p>Hello</p><!-- /wp:paragraph -->' --porcelain`
When I run `wp post create --post_title="Block Post" --post_content="<!-- wp:paragraph --><p>Hello</p><!-- /wp:paragraph -->" --porcelain`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

While this change to use double quotes for command arguments is correct for Windows compatibility, I've noticed that this fix has not been applied consistently throughout the file. There are other wp post create commands that still use single-quoted arguments containing spaces (e.g., on lines 1232, 1248). For complete Windows compatibility, all such instances should be updated to use double quotes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant