diff options
author | dozens | 2024-06-07 17:27:11 -0600 |
---|---|---|
committer | dozens | 2024-06-07 17:27:11 -0600 |
commit | 91b1662302c14cf84ca8b90c1f3ec20a585f67a5 (patch) | |
tree | 53084ac52460ed61be1308e13ce17dce92ea81d8 /test | |
parent | f985dc4e5c9fdec06436c21440c3dc7245369847 (diff) |
add ui tests
Diffstat (limited to 'test')
-rw-r--r-- | test/README | 18 | ||||
-rw-r--r-- | test/moving-capture.dat | 22 | ||||
-rw-r--r-- | test/placing-capture.dat | 5 | ||||
-rw-r--r-- | test/test.awk | 12 |
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" +} |