WP-CLI 命令行手册

title: "Then /^the return code should( not)? be (\d+)$/" post_status: publish comment_status: open taxonomy: category: - wp-cli-handbook post_tag: - Behat Steps - Repos - Data


Then /^the return code should( not)? be (\d+)$/

检查先前命令的退出码是否符合预期。


用法

Scenario: 我的示例场景
  Given 一个 WP 安装
  When 我尝试执行 `wp plugin install`
  Then 返回码应为 1

Behat 步骤文档随每个 WP-CLI 版本发布自动生成。如需改进,请提交 Pull Request。


相关