Move logpile to git.mchus.pro/reanimator/parser/v38 v38.0.0 (ADL-085). Add scripts/bump-parser.sh, which bumps the parser, tests, commits, tags the release as v<counter>.<parser major>, pushes and builds (ADL-086). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
21 lines
689 B
Go
21 lines
689 B
Go
package server
|
|
|
|
import (
|
|
"git.mchus.pro/reanimator/parser/v38/models"
|
|
"testing"
|
|
)
|
|
|
|
func TestNormalizePCIeSerialComponentName_PrefersPartOverGenericClass(t *testing.T) {
|
|
got := normalizePCIeSerialComponentName(models.PCIeDevice{DeviceClass: "Display Controller", PartNumber: "GH100 [H200 NVL]"})
|
|
if got != "GH100 [H200 NVL]" {
|
|
t.Fatalf("expected part number, got %q", got)
|
|
}
|
|
}
|
|
|
|
func TestNormalizePCIeSerialComponentName_UsesClassWhenSpecific(t *testing.T) {
|
|
got := normalizePCIeSerialComponentName(models.PCIeDevice{DeviceClass: "I350 Gigabit Network Connection", PartNumber: "I350T4V2"})
|
|
if got != "I350T4V2" {
|
|
t.Fatalf("expected part number for readability, got %q", got)
|
|
}
|
|
}
|