Skip to content

Conversation

@bithium
Copy link
Contributor

@bithium bithium commented Oct 14, 2021

This patch fixes a bug with the OrderSettings transformer where if a
test case/keyword has a comment on the same line the output would be
incorrect, e.g. given this input

Test case  # comment1
   [Teardown]  teardown
   [Documentation]  this is
   Keyword1
   # comment2
   Keyword2
   # comment3
   Keyword3

The expected output is:

Test case  # comment1
   [Documentation]  this is
   Keyword1
   # comment2
   Keyword2
   # comment3
   Keyword3
   [Teardown]  teardown

However before this patch the output would be:

Test case  [Documentation]  this is
   # comment1
   Keyword1
   # comment2
   Keyword2
   # comment3
   Keyword3
   [Teardown]  teardown

This patch fixes a bug with the OrderSettings transformer where if a
test case/keyword has a comment on the same line the output would be
incorrect, e.g. given this input

```robot
Test case  # comment1
   [Teardown]  teardown
   [Documentation]  this is
   Keyword1
   # comment2
   Keyword2
   # comment3
   Keyword3
```

The expected output is:

```robot
Test case  # comment1
   [Documentation]  this is
   Keyword1
   # comment2
   Keyword2
   # comment3
   Keyword3
   [Teardown]  teardown
```

However before this patch the output would be:

```robot
Test case  [Documentation]  this is
   # comment1
   Keyword1
   # comment2
   Keyword2
   # comment3
   Keyword3
   [Teardown]  teardown
```
@bithium bithium requested review from bhirsz and mnojek as code owners October 14, 2021 10:01
@bhirsz
Copy link
Member

bhirsz commented Oct 14, 2021

Thank you for finding and fixing this issue - this PR looks really good :)!

@bhirsz bhirsz merged commit a1652d1 into MarketSquare:main Oct 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants