surtur
4b6e655ebf
All checks were successful
continuous-integration/drone/push Build is passing
* add 'version' command - "go-xkcdreader version" returns a formatted version of the app * test (among other things) that the version in flake.nix matches the version hardcoded in app's go code (cmd/version.go)
17 lines
289 B
Go
17 lines
289 B
Go
package main
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"git.dotya.ml/wanderer/go-xkcdreader/cmd"
|
|
)
|
|
|
|
func TestGreetingText(t *testing.T) {
|
|
want := "welcome to " + cmd.GetAppName()
|
|
got := makeGreeting()
|
|
|
|
if got.Text != want {
|
|
t.Errorf("Incorrect initial greeting, want: %q, got: %q", want, got.Text)
|
|
}
|
|
}
|