aboutsummaryrefslogtreecommitdiff
path: root/config/game_test.go
diff options
context:
space:
mode:
authorJulien Dessaux2020-12-24 15:18:24 +0100
committerJulien Dessaux2020-12-24 15:18:24 +0100
commitb4dc5d6841f7ded5995e5f308509b1a3a034cbed (patch)
tree254466925238c53bd51372a57558ec68fdf78205 /config/game_test.go
parentImplemented the configuration file format (diff)
downloadshell-game-launcher-b4dc5d6841f7ded5995e5f308509b1a3a034cbed.tar.gz
shell-game-launcher-b4dc5d6841f7ded5995e5f308509b1a3a034cbed.tar.bz2
shell-game-launcher-b4dc5d6841f7ded5995e5f308509b1a3a034cbed.zip
Began implementing config validation
Diffstat (limited to 'config/game_test.go')
-rw-r--r--config/game_test.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/config/game_test.go b/config/game_test.go
new file mode 100644
index 0000000..d295ce2
--- /dev/null
+++ b/config/game_test.go
@@ -0,0 +1,10 @@
+package config
+
+import "testing"
+
+func TestGameValidate(t *testing.T) {
+ empty := Game{}
+ if err := empty.validate("invalid game name because of spaces"); err == nil {
+ t.Fatal("invalid game name")
+ }
+}