Fixed a bug in a test that caused other channel names than master to fail.?

This commit is contained in:
Storm Dragon committed 2026-10-22 01:42:53 -04:00
1 parent b7426177d9
commit e62f8c8e17
2 files changed
+4 -4

No files matched your search

@@ -4,7 +4,7 @@
pkgbase=cthulhu-git
pkgname=cthulhu-git
_pkgname=cthulhu
pkgver=2026.10.20.r63.ge88de5e
pkgver=2026.10.22.r64.gb742617
pkgrel=1
pkgdesc="Desktop-agnostic screen reader with speech, Braille, and Tentacle support"
url="https://git.stormux.org/storm/cthulhu"
+3 -3
View File
@@ -27,7 +27,7 @@ func TestStringIncludesBuild(t *testing.T) {
Build = "test-build"
defer func() { Build = originalBuild }()
if got, want := String(), "Cthulhu screen reader version test-build-master"; got != want {
if got, want := String(), "Cthulhu screen reader version test-build-"+Channel; got != want {
t.Fatalf("String() = %q, want %q", got, want)
}
}
@@ -36,14 +36,14 @@ func TestStringUsesCurrentVersionByDefault(t *testing.T) {
if Build != Version {
t.Fatalf("Build = %q, want %q", Build, Version)
}
if got, want := String(), "Cthulhu screen reader version "+Version+"-master"; got != want {
if got, want := String(), "Cthulhu screen reader version "+Version+"-"+Channel; got != want {
t.Fatalf("String() = %q, want %q", got, want)
}
}
func TestDetailsIncludesATSPIAndSession(t *testing.T) {
got := Details("2.58.0", "x11", "GNOME")
want := "Cthulhu screen reader version " + Version + "-master, AT-SPI2 version: 2.58.0, Session: x11 GNOME"
want := "Cthulhu screen reader version " + Version + "-" + Channel + ", AT-SPI2 version: 2.58.0, Session: x11 GNOME"
if got != want {
t.Fatalf("Details() = %q, want %q", got, want)
}