Skip to content

Commit

Permalink
Fixing test when no distribution detected
Browse files Browse the repository at this point in the history
  • Loading branch information
uaalto committed Aug 17, 2015
1 parent 99c65b2 commit 8b9e7c1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/github.com/getlantern/osversion/osversion_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func TestString(t *testing.T) {
t.Fatal("Error getting string")
}
if !reg.MatchString(str) {
t.Fatal("Improper string format: %s", str)
t.Fatalf("Improper string format: %s", str)
}
}

Expand All @@ -33,9 +33,9 @@ func TestHumanReadable(t *testing.T) {
if err != nil {
t.Fatal("Error getting string")
}
reg := regexp.MustCompile(".+kernel.+")
reg := regexp.MustCompile(".*kernel.+")
if !reg.MatchString(str) {
t.Fatal("Improper human readable format: %s", str)
t.Fatalf("Improper human readable format: %s", str)
}
case "windows":
str, err := GetHumanReadable()
Expand All @@ -44,7 +44,7 @@ func TestHumanReadable(t *testing.T) {
}
reg := regexp.MustCompile("Windows .+")
if !reg.MatchString(str) {
t.Fatal("Improper human readable format: %s", str)
t.Fatalf("Improper human readable format: %s", str)
}
default:
t.Fatal("Unsupported OS detected: %s", runtime.GOOS)
Expand Down

0 comments on commit 8b9e7c1

Please sign in to comment.