-
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Ensure doc standards and patterns are not stacked when switching…
… filetype
- Loading branch information
Showing
5 changed files
with
56 additions
and
0 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
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
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
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
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,26 @@ | ||
# ============================================================================== | ||
# Switch from PHP to JavaScript and make sure doc standards of PHP get removed. | ||
# ============================================================================== | ||
|
||
Execute (switch from PHP to JavaScript): | ||
setfiletype php | ||
AssertEqual exists('b:doge_prev_supported_doc_standards'), 1 | ||
AssertEqual has_key(b:doge_patterns, 'phpdoc'), 1 | ||
AssertEqual has_key(b:doge_patterns, 'jsdoc'), 0 | ||
|
||
Assert index(b:doge_supported_doc_standards, 'phpdoc') >= 0 | ||
Assert index(b:doge_supported_doc_standards, 'jsdoc') < 0 | ||
|
||
Assert index(b:doge_prev_supported_doc_standards, 'phpdoc') >= 0 | ||
Assert index(b:doge_prev_supported_doc_standards, 'jsdoc') < 0 | ||
|
||
# Change to JavaScript and make sure the phpdoc gets removed. | ||
setfiletype javascript | ||
AssertEqual 0, has_key(b:doge_patterns, 'phpdoc') | ||
AssertEqual 1, has_key(b:doge_patterns, 'jsdoc') | ||
|
||
Assert index(b:doge_supported_doc_standards, 'phpdoc') < 0 | ||
Assert index(b:doge_supported_doc_standards, 'jsdoc') >= 0 | ||
|
||
Assert index(b:doge_prev_supported_doc_standards, 'phpdoc') < 0 | ||
Assert index(b:doge_prev_supported_doc_standards, 'jsdoc') >= 0 |