PSVersionTable.Tests.ps1 handles certain builds incorrectly.
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 1/5
- Temps estimé
- 1-3 heures
- Accessibilité débutants
- 72/100
- Type d'issue
- Bug
- Clarté
- Clairement spécifiée
- Activité
- Calme
- Stack technique
- powershell
- Domaine
- testing-qa
Piste de recherche
Commencez dans test/powershell/Host/PSVersionTable.Tests.ps1, en particulier par les assertions GitCommitId autour de la ligne 55, et comparez-les au format GitCommitId décrit dans PSVersionInfoGenerator.cs. Mettez à jour le motif ou l’attente du test afin que la valeur signalée 7.6.2-0-g... soit correctement traitée, puis exécutez les tests PSVersionTable et confirmez que le build avec un tag propre ne produit aucune erreur.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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
Affected version: All up to trunk.
There's a logic mismatch in PSVersionTable.Tests.ps1. More specifically, it tests here whether or not a commit build matches "^(\d+\.\d+\.\d+)(-.+)?" - and the issue is that GitCommitId absolutely can look like that and will indeed. See the comments here in PSVersionInfoGenerator.cs about how such a GitCommitId can look - but most importantly, it's ALWAYS prefixed by the version - and thus always matching the string it should not match.
As you can see, my GitCommitId after a clean build from the 7.6.2 git tag is 7.6.2-0-g0d3c290a8737d4252ee75c052d16190ffcdb7d19. This matches of course.
Expected behavior
No error.
Actual behavior
[-] GitCommitId property 3ms
Expected regular expression '^(\d+\.\d+\.\d+)(-.+)?-(\d+)-g(.+)$' to not match '7.6.2-0-g0d3c290a8737d4252ee75c052d16190ffcdb7d19', but it did match.
55: $PSVersionTable.GitCommitId | Should -Not -Match $unexpectectGitCommitIdPattern
at <ScriptBlock>, /home/aurutils/.cache/aurutils/sync/powershell/src/PowerShell/test/powershell/Host/PSVersionTable.Tests.ps1: line 55
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
- Langage dominant
- C#
- Étoiles
- 55.5k
- Forks
- 8.5k
- Merge moyen
- 1 j 11 h
- PR mergées (30 j)
- 86
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de PowerShell/PowerShell
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 90/100
PowerShell/PowerShell#28037 ·
-
Needs-Triage
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
PowerShell/PowerShell#27973 · 1 commentaire ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
PowerShell/PowerShell#27720 ·
-
Issue-Bug Up-for-Grabs WG-Cmdlets WG-Reviewed
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
PowerShell/PowerShell#27670 · 3 commentaires ·
-
Issue-Bug Up-for-Grabs WG-Reviewed
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
PowerShell/PowerShell#27656 · 2 commentaires ·
Toutes les issues de PowerShell/PowerShell
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
nightscout/nocturne#1379 ·
-
release-notes in .NET 11 RC2 Ouvertepriority-0
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 78/100
StackExchange/StackExchange.Redis#3249 ·
-
[Feat] 조합 영역 구분선 개선 Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
-
documentation
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100