Debian Codegraph @

issue.features/issue0044.feature

raw
1 @issue
2 Feature: Issue #44 Shell-like comments are removed in Multiline Args
3
4 As I user
5 I want that multiline arguments (docstrings) contents are preserved.
6
7 Background: Test Setup
8 Given a new working directory
9 And a file named "features/steps/steps.py" with:
10 """
11 from behave import given, when, then
12 from hamcrest import assert_that, equal_to
13
14 @given(u'a multiline text argument with')
15 def step(context):
16 context.expected_text = context.text
17
18 @then(u'the multiline text argument should be')
19 def step(context):
20 assert_that(context.text, equal_to(context.expected_text))
21 """
22
23 Scenario: Ensure shell comment lines are not filtered out in multiline text
24 Given a file named "features/issue44_test.feature" with:
25 '''
26 Feature: Multiline text with shell comment lines
27 Scenario:
28 Given a multiline text argument with:
29 """
30 Lorem ipsum.
31 # THIS IS A SHELL COMMENT.
32 Ipsum lorem.
33 """
34 Then the multiline text argument should be:
35 """
36 Lorem ipsum.
37 # THIS IS A SHELL COMMENT.
38 Ipsum lorem.
39 """
40 '''
41 When I run "behave -c -f pretty features/issue44_test.feature"
42 Then it should pass
43 And the command output should contain:
44 """
45 # THIS IS A SHELL COMMENT.
46 """
47 But the command output should not contain:
48 """
49 Lorem ipsum.
50 Ipsum lorem.
51 """