@flowscripter/example-cli 3.1.1 → 3.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -28,6 +28,16 @@ def step_impl(context, message):
|
|
|
28
28
|
context.pexpect_wrapper.expect(message)
|
|
29
29
|
|
|
30
30
|
|
|
31
|
+
@then('the executable should have either output "{message}" or "{alternative}"')
|
|
32
|
+
def step_impl(context, message, alternative):
|
|
33
|
+
output = list(context.pexpect_wrapper.output)
|
|
34
|
+
try:
|
|
35
|
+
context.pexpect_wrapper.expect(message)
|
|
36
|
+
except AssertionError:
|
|
37
|
+
context.pexpect_wrapper.output = output
|
|
38
|
+
context.pexpect_wrapper.expect(alternative)
|
|
39
|
+
|
|
40
|
+
|
|
31
41
|
@when('the executable stdout is captured for "{args}"')
|
|
32
42
|
def step_impl(context, args):
|
|
33
43
|
wrapper = SubprocessWrapper(os.environ.get('EXECUTABLE'))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Feature: Upgrade
|
|
2
2
|
|
|
3
|
-
Scenario: Running upgrade reports already up to date
|
|
3
|
+
Scenario: Running upgrade either upgrades or reports already up to date
|
|
4
4
|
When the executable is launched with "upgrade"
|
|
5
5
|
Then the executable should complete with exit code 0
|
|
6
|
-
And the executable should have output "example-cli is already up to date"
|
|
6
|
+
And the executable should have either output "example-cli upgraded" or "example-cli is already up to date"
|