Powershell: Add PSParser tests and ensure the API is in sync with changes to the PowerShell parser

Created on 14 Oct 2020  路  2Comments  路  Source: PowerShell/PowerShell

Issue-Question WG-Quality-Test

All 2 comments

There are some debug asserts used in... I think the parser? or the Token file itself? One of those... that ensures that the token names are matched 1:1 with token types. Perhaps something similar would help for the PSToken API? Since any changes to either will be easily noticed in debug builds.

Quote from @iSazonov (https://github.com/PowerShell/PowerShell/pull/13779#issuecomment-708149421)

As for test, we could add temporary internal static method to check a consistency of s_tokenKindMapping and other static mappings in xUnit test.

Was this page helpful?
0 / 5 - 0 ratings