summary refs log tree commit diff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/README18
-rw-r--r--test/moving-capture.dat22
-rw-r--r--test/placing-capture.dat5
-rw-r--r--test/test.awk12
4 files changed, 57 insertions, 0 deletions
diff --git a/test/README b/test/README
new file mode 100644
index 0000000..11b09a4
--- /dev/null
+++ b/test/README
@@ -0,0 +1,18 @@
+== ABOUT ==
+
+these files are to help me test the ui
+
+moves are recorded in `<file>.dat`.
+then you can `awk -f test.awk file.dat > file.expect`.
+(or `just expects` to build them all.)
+then you can `expect file.expect`
+to have expect play the game for you up to a certain point.
+
+== REQUIREMENTS ==
+
+- awk
+- expect
+
+== FUTURE PLANS ==
+
+have actual integration tests?
diff --git a/test/moving-capture.dat b/test/moving-capture.dat
new file mode 100644
index 0000000..d19ede6
--- /dev/null
+++ b/test/moving-capture.dat
@@ -0,0 +1,22 @@
+A1
+A4
+A7
+b2
+b4
+b6
+c3
+c4
+c5
+d1
+d2
+d3
+d5
+d6
+d7
+e3
+e4
+e5
+e4f4
+e3e4
+f4g4
+d3e3
diff --git a/test/placing-capture.dat b/test/placing-capture.dat
new file mode 100644
index 0000000..67aebec
--- /dev/null
+++ b/test/placing-capture.dat
@@ -0,0 +1,5 @@
+a1
+b4
+a4
+b2
+a7
diff --git a/test/test.awk b/test/test.awk
new file mode 100644
index 0000000..ef6df20
--- /dev/null
+++ b/test/test.awk
@@ -0,0 +1,12 @@
+BEGIN {
+  print "#!/usr/bin/expect -f"
+  print "spawn fennel main.fnl"
+}
+
+{ print "expect -re \"Player .'s turn:\""
+  print "send -- \"" $0 "\\r\""
+}
+
+END {
+  print "interact"
+}