Skip to content
This repository was archived by the owner on Apr 20, 2021. It is now read-only.
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
4 changes: 4 additions & 0 deletions i18n/en.xliff.dist
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@
<source>(I )execute :command from project root</source>
<target></target>
</trans-unit>
<trans-unit id="i-display-the-last-command-output">
<source>(I )display the last command output</source>
<target></target>
</trans-unit>
<trans-unit id="command-should-succeed">
<source>command should succeed</source>
<target></target>
Expand Down
10 changes: 10 additions & 0 deletions src/Context/SystemContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@ public function iExecuteFromProjectRoot($cmd)
$this->iExecute($cmd);
}

/**
* Display the last command output
*
* @Then (I )display the last command output
*/
public function iDumpCommandOutput()
{
echo implode(PHP_EOL, $this->output);
}

/**
* Command should succeed
*
Expand Down
4 changes: 4 additions & 0 deletions tests/features/system.feature
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ Feature: System feature
Given I execute "sleep 2"
Then Command should last more than 1 seconds

Scenario: Testing displaying output
Given I execute "echo 'Hello world'"
Then display the last command output

Scenario: Testing execution output
Given I execute "echo 'Hello world'"
Then output should contain "Hello world"
Expand Down