Title: incorrect assertions in test specs · Issue #176 · PowerShell/EditorSyntax · GitHub
Open Graph Title: incorrect assertions in test specs · Issue #176 · PowerShell/EditorSyntax
X Title: incorrect assertions in test specs · Issue #176 · PowerShell/EditorSyntax
Description: This is to point out some incorrect assertions in the spec tests. EditorSyntax/spec/testfiles/syntax_test_TheBigTestFile.ps1 Lines 428 to 430 in 44eac87 3++2 # ^ ^^ constant.numeric.integer.powershell # ^ keyword.operator.assignment.powe...
Open Graph Description: This is to point out some incorrect assertions in the spec tests. EditorSyntax/spec/testfiles/syntax_test_TheBigTestFile.ps1 Lines 428 to 430 in 44eac87 3++2 # ^ ^^ constant.numeric.integer.powersh...
X Description: This is to point out some incorrect assertions in the spec tests. EditorSyntax/spec/testfiles/syntax_test_TheBigTestFile.ps1 Lines 428 to 430 in 44eac87 3++2 # ^ ^^ constant.numeric.integer.powersh...
Opengraph URL: https://github.com/PowerShell/EditorSyntax/issues/176
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"incorrect assertions in test specs","articleBody":"This is to point out some incorrect assertions in the spec tests.\r\n\r\nhttps://github.com/PowerShell/EditorSyntax/blob/44eac8702f3cbe55a4ec70c1fdb163d42b4162fc/spec/testfiles/syntax_test_TheBigTestFile.ps1#L428-L430\r\n\r\nThe `++` is actually the unary increment operator, and PowerShell will flag this as an error because it cannot be used on a constant.\r\n\r\n\r\nhttps://github.com/PowerShell/EditorSyntax/blob/44eac8702f3cbe55a4ec70c1fdb163d42b4162fc/spec/testfiles/syntax_test_TheBigTestFile.ps1#L569-L571\r\n\r\nThese 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.\r\n\r\nhttps://github.com/PowerShell/EditorSyntax/blob/44eac8702f3cbe55a4ec70c1fdb163d42b4162fc/spec/testfiles/syntax_test_TheBigTestFile.ps1#L771-L776\r\n\r\nThe `#` 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.\r\n\r\n(Example under PR #156)\r\n\r\n\r\nhttps://github.com/PowerShell/EditorSyntax/blob/44eac8702f3cbe55a4ec70c1fdb163d42b4162fc/spec/testfiles/syntax_test_TheBigTestFile.ps1#L1181-L1187\r\n\r\nLine 1186 specs the `$` as `definition.variable`. This is covered in issue #132.\r\n\r\n(Example under PR #156 I have scoped it as `punctuation.section.embedded.begin`)\r\n\r\n\r\nThis 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.\r\n\r\n\r\n","author":{"url":"https://github.com/msftrncs","@type":"Person","name":"msftrncs"},"datePublished":"2019-05-15T05:00:48Z","url":"https://github.com/PowerShell/EditorSyntax/issues/176"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1c82d861-590a-722b-97ef-8c9af0b3c972 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9FD2:208520:14187C:1C6B18:6AFE0F2D |
| html-safe-nonce | 349fa600ef99ecfab5f547ea124f494fdabdc479eeef6f4d2c840b3796358303 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RkQyOjIwODUyMDoxNDE4N0M6MUM2QjE4OjZBRkUwRjJEIiwidmlzaXRvcl9pZCI6IjMxMzI5NTc0Mjc2NDE0ODcxNDkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5059f7fa60cd81b41e428aafed209a50a0383dadb32e63250cc83beb66e29801 |
| hovercard-subject-tag | issue:444237138 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/EditorSyntax/176/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bfd552f44b1124d8783390e62b868188480488f9588e7a205aef52d6aa06a453/PowerShell/EditorSyntax/issues/176 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bfd552f44b1124d8783390e62b868188480488f9588e7a205aef52d6aa06a453/PowerShell/EditorSyntax/issues/176 |
| og:image:alt | This is to point out some incorrect assertions in the spec tests. EditorSyntax/spec/testfiles/syntax_test_TheBigTestFile.ps1 Lines 428 to 430 in 44eac87 3++2 # ^ ^^ constant.numeric.integer.powersh... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | msftrncs |
| hostname | github.com |
| expected-hostname | github.com |
| None | 1fd4053be37b4bd545b4f38f1cecad058c343776acf2cbc6806316f26270e55e |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/EditorSyntax git https://github.com/PowerShell/EditorSyntax.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 59601299 |
| octolytics-dimension-repository_nwo | PowerShell/EditorSyntax |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 59601299 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/EditorSyntax |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 635a57b3d0df6bc21c0f39fc7078888fb90e4066 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width