/
syntax-longstrings.feature
85 lines (71 loc) · 1.86 KB
/
syntax-longstrings.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
Feature: Long strings
In order to give more data to step definitions
As a feature writer
I want to be able to write multiline strings just like in Python
Escape characters are documented in
<http://www.python.org/doc/2.5.2/ref/strings.html>
Background:
Given xreq is in the PATH
And I am in the xreq directory
And a file "features/data/tmp-test.feature":
"""
Feature: test
Background:
Given this step works
\"\"\"
a
\"\"\"
\"\"\"
b
\"\"\"
Scenario: A
Given the long string:
'''
abc
def
'''
When I compare it with "abc\n \ndef"
Then they are equal
Scenario: B
Given the long string:
'''
abc '''
def \\'''
'''
When I compare it with "abc '''\ndef \\'''"
Then they are equal
"""
Scenario: Test long strings
When I run xreq -m -x suite features/data/tmp-test.feature
Then it should pass
When I run the test suite "./suite" in features/data/tests
Then it should pass with
"""
Feature: test
Background:
Given this step works
\"\"\"
a
\"\"\"
\"\"\"
b
\"\"\"
Scenario: A
Given the long string:
\"\"\"
abc
def
\"\"\"
When I compare it with "abc\n \ndef"
Then they are equal
Scenario: B
Given the long string:
\"\"\"
abc '''
def \'''
\"\"\"
When I compare it with "abc '''\ndef \\'''"
Then they are equal
2 scenarios (2 passed)
8 steps (8 passed)
"""