summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/cli-opts.sh2
-rw-r--r--tests/lib_test.go23
2 files changed, 25 insertions, 0 deletions
diff --git a/tests/cli-opts.sh b/tests/cli-opts.sh
new file mode 100755
index 0000000..92b70ea
--- /dev/null
+++ b/tests/cli-opts.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+set -eu
diff --git a/tests/lib_test.go b/tests/lib_test.go
new file mode 100644
index 0000000..a857510
--- /dev/null
+++ b/tests/lib_test.go
@@ -0,0 +1,23 @@
+package binder_test
+
+import (
+ "testing"
+
+ g "euandre.org/gobang/src"
+
+ "euandre.org/binder/src"
+)
+
+func TestPlaceholder(t *testing.T) {
+ g.AssertEqual(t, binder.USER, "nobody")
+}
+
+func TestParseArgs(t *testing.T) {
+ given := binder.ParseArgs([]string { "a", "b", "c" })
+ expected := binder.CLIArgs {
+ FromAddr: "b",
+ ToAddr: "c",
+ }
+
+ g.AssertEqual(t, given, expected)
+}