HelpSystem.Tests.ps1 cannot handle culture not being defined
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 78/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Pouca atividade
- Stack de tecnologia
- powershell
- Domínio
- testing-qa
Direção de pesquisa
Comece por test/powershell/engine/Help/HelpSystem.Tests.ps1 próximo às linhas 425 e 434 e, em seguida, compare o tratamento de cultura em test/powershell/engine/Help/UpdatableHelpSystem.Tests.ps1 próximo às linhas 438-441. Execute os testes de Help afetados com a cultura atual definida como Invariant Language (LCID 127). A tarefa estará concluída quando ambos os testes de full-help passarem sem erros nesse ambiente.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
Reproducible on 7.6.2.
The test "help should return full view without -Full switch" and "help should return full view even with -Full switch" have the problem, that they'll break if the current culture is Invariant Language (Invariant Country) (LCID 127). This can happen on Linux systems if the LANG etc. environment variables are left to C.UTF-8. In this situation, there's no Get-Help pages available in the current language - and thus no PARAMETERS section either on a "Full" help page, breaking the test.
In the past, UpdatableHelpSystem.Tests.ps1 has been fixed by 16558c94146e44422f9e5b4f0f917775def51087 and now sets a culture if LCID is 127. This test would need a similar fix.
Expected behavior
No error.
Actual behavior
[-] help should return full view without -Full switch 6ms
Expected a value, but got $null or empty.
425: $gpsHelp | Where-Object {$_ -cmatch '^PARAMETERS'} | Should -Not -BeNullOrEmpty
at <ScriptBlock>, /build/powershell/src/PowerShell/test/powershell/engine/Help/HelpSystem.Tests.ps1: line 425
[-] help should return full view even with -Full switch 6ms
Expected a value, but got $null or empty.
434: $gpsHelp | Where-Object {$_ -cmatch '^PARAMETERS'} | Should -Not -BeNullOrEmpty
at <ScriptBlock>, /build/powershell/src/PowerShell/test/powershell/engine/Help/HelpSystem.Tests.ps1: line 434
Error details
Environment data
Name Value
---- -----
PSVersion 7.6.2
PSEdition Core
GitCommitId 7.6.2-0-g0d3c290a8737d4252ee75c052d16190ffcdb7d19
OS Arch Linux
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.4
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Visuals
No response
- Linguagem predominante
- C#
- Estrelas
- 55.5k
- Forks
- 8.5k
- Merge médio
- 1d 17h
- PRs com merge (30d)
- 97
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de PowerShell/PowerShell
-
Issue-Enhancement Needs-Triage
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 86/100
PowerShell/PowerShell#28061 · 2 reações ·
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 90/100
PowerShell/PowerShell#28037 ·
-
Needs-Triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
PowerShell/PowerShell#27973 · 1 comentário ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
PowerShell/PowerShell#27720 ·
-
Issue-Bug Up-for-Grabs WG-Cmdlets WG-Reviewed
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
PowerShell/PowerShell#27670 · 3 comentários ·
Todas as issues de PowerShell/PowerShell
Issues semelhantes
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
nightscout/nocturne#1425 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
RayWangQvQ/BiliBiliToolPro#1137 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100