-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug with comments in commands with condition syntax
- Loading branch information
1 parent
6cf1a5b
commit fa4e0e0
Showing
3 changed files
with
124 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
tests/formatter/comments_in_commands_with_condition_syntax.in.cmake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
if( | ||
FOO STREQUAL "bar" OR | ||
|
||
# line comment | ||
FOO STREQUAL "baz" | ||
) | ||
endif() | ||
|
||
|
||
if( | ||
FOO STREQUAL "bar" OR | ||
|
||
# line comment | ||
# with | ||
# multiple lines | ||
FOO STREQUAL "baz" | ||
) | ||
endif() | ||
|
||
if( | ||
FOO STREQUAL "bar" OR | ||
|
||
# line comment | ||
# with | ||
# multiple lines | ||
|
||
FOO STREQUAL "baz" | ||
) | ||
endif() | ||
|
||
if( | ||
FOO STREQUAL "bar" OR | ||
|
||
#[ bracket comment ] | ||
FOO STREQUAL "baz" | ||
) | ||
endif() | ||
|
||
if( | ||
FOO STREQUAL "bar" OR | ||
|
||
#[[ bracket comment | ||
with | ||
multiple lines ]] | ||
FOO STREQUAL "baz" | ||
) | ||
endif() | ||
|
||
|
||
if( | ||
FOO STREQUAL "bar" OR | ||
|
||
#[[ bracket comment | ||
with | ||
multiple lines ]] | ||
|
||
FOO STREQUAL "baz" | ||
) | ||
endif() |
55 changes: 55 additions & 0 deletions
55
tests/formatter/comments_in_commands_with_condition_syntax.out.cmake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
if( | ||
FOO STREQUAL "bar" | ||
OR | ||
# line comment | ||
FOO STREQUAL "baz" | ||
) | ||
endif() | ||
|
||
if( | ||
FOO STREQUAL "bar" | ||
OR | ||
# line comment | ||
# with | ||
# multiple lines | ||
FOO STREQUAL "baz" | ||
) | ||
endif() | ||
|
||
if( | ||
FOO STREQUAL "bar" | ||
OR | ||
# line comment | ||
# with | ||
# multiple lines | ||
FOO STREQUAL "baz" | ||
) | ||
endif() | ||
|
||
if( | ||
FOO STREQUAL "bar" | ||
OR | ||
#[ bracket comment ] | ||
FOO STREQUAL "baz" | ||
) | ||
endif() | ||
|
||
if( | ||
FOO STREQUAL "bar" | ||
OR | ||
#[[ bracket comment | ||
with | ||
multiple lines ]] | ||
FOO STREQUAL "baz" | ||
) | ||
endif() | ||
|
||
if( | ||
FOO STREQUAL "bar" | ||
OR | ||
#[[ bracket comment | ||
with | ||
multiple lines ]] | ||
FOO STREQUAL "baz" | ||
) | ||
endif() |