incorrect assertions in test specs
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- powershell
- Domain
- testing-qa
Research direction
Start in spec/testfiles/syntax_test_TheBigTestFile.ps1 at the referenced ranges around lines 428, 569, 771, and 1181. Compare each assertion with the semantics described in issues #112, #62, and #132, then correct the misleading expectations and run the relevant spec tests to confirm the assertions match the grammar.
Written by the indexing model from the issue text.
Description
This is to point out some incorrect assertions in the spec tests.
The ++ is actually the unary increment operator, and PowerShell will flag this as an error because it cannot be used on a constant.

These are not operators in these instances, so even though the grammar scopes them as such, asserting these tests is misleading and will require correcting when the grammar is improved. This is covered in issue #112.
The # is this spec is not a line comment token. Its actually part of an unquoted non-expanding string that describes a function/command name. This is covered in issue #62.
(Example under PR #156)

Line 1186 specs the $ as definition.variable. This is covered in issue #132.
(Example under PR #156 I have scoped it as punctuation.section.embedded.begin)

This might only be a partial listing. This is some of the specs I am constantly looking at when checking my work. I list these more so that others can avoid needing to question these.
- Dominant language
- PowerShell
- Stars
- 151
- Forks
- 55
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PowerShell/EditorSyntax
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
PowerShell/EditorSyntax#224 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
PowerShell/EditorSyntax#222 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
PowerShell/EditorSyntax#221 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
PowerShell/EditorSyntax#220 · 2 comments · 1 reaction ·
-
Issue-Bug
Difficulty 3/5 1-2 days Newbie friendliness 48/100
PowerShell/EditorSyntax#219 · 2 comments ·