forked from Behatch/contexts
-
Notifications
You must be signed in to change notification settings - Fork 1
/
system.feature
48 lines (40 loc) · 1.38 KB
/
system.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Feature: System feature
Scenario: Testing execution
Given I execute "true"
Then command should succeed
Given I execute "false"
Then command should fail
Scenario: Testing execution time
Given I execute "sleep 1"
Then Command should last less than 2 seconds
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"
And output should contain "Hel.*ld"
And output should not contain "Hello John"
And output should not contain "Hel.*hn"
Scenario: Testing execution output wall output
Given I execute "echo 'Hello world\nHow are you?'"
Then output should be:
"""
Hello world
How are you?
"""
And output should not be:
"""
Hello John
How are you?
"""
Scenario: Testing execution from the project root
Given I execute "bin/behat --help"
Scenario: File creation
When I create the file "tests/fixtures/test" containing:
"""
A new file
"""
Then print the content of "tests/fixtures/test" file