summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Mikkelsen <petermikkelsen10@gmail.com>2026-05-31 16:33:31 +0200
committerPeter Mikkelsen <petermikkelsen10@gmail.com>2026-05-31 16:33:31 +0200
commit6754d151b21915b57b41b8200744a5be5db39112 (patch)
tree71a66e3e0971d0a0d8ebbfd6a37b2eb521f1b072
parentf2c388a69e482fcca87c1eadaa419a9bf95a2e20 (diff)
Commit some testsuite stuffHEADmaster
-rw-r--r--testsuite/Makefile.am1
-rw-r--r--testsuite/aplwc.bin/example.exp10
-rw-r--r--testsuite/aplwc.bin/version.exp10
-rw-r--r--testsuite/aplwc.lib/example.exp1
-rw-r--r--testsuite/config/default.exp1
-rw-r--r--testsuite/lib/aplwc.exp6
-rw-r--r--testsuite/site_extra.exp.in2
7 files changed, 26 insertions, 5 deletions
diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am
index 51c1011..f75f89a 100644
--- a/testsuite/Makefile.am
+++ b/testsuite/Makefile.am
@@ -1,6 +1,5 @@
AUTOMAKE_OPTIONS = dejagnu
EXTRA_DEJAGNU_SITE_CONFIG = site_extra.exp
-DEJATOOL = aplwc.bin aplwc.lib
CLEANFILES = *.log *.sum site.exp
EXTRA_DIST = \
lib/*.exp \
diff --git a/testsuite/aplwc.bin/example.exp b/testsuite/aplwc.bin/example.exp
index 15ba15c..296dc0e 100644
--- a/testsuite/aplwc.bin/example.exp
+++ b/testsuite/aplwc.bin/example.exp
@@ -1,2 +1,8 @@
-spawn "${aplwc_bin}"
-fail "not implemented"
+aplwc_start
+expect {
+ " " { pass "6-space prompt" }
+}
+send "\004"
+expect {
+ eof { pass "EOT ends the session" }
+}
diff --git a/testsuite/aplwc.bin/version.exp b/testsuite/aplwc.bin/version.exp
new file mode 100644
index 0000000..c8a20aa
--- /dev/null
+++ b/testsuite/aplwc.bin/version.exp
@@ -0,0 +1,10 @@
+aplwc_start "--version"
+expect {
+ "aplwc" {
+ pass "version contains program name"
+ }
+ timeout {
+ unresolved "timeout"
+ }
+}
+
diff --git a/testsuite/aplwc.lib/example.exp b/testsuite/aplwc.lib/example.exp
index 92e00d8..756429a 100644
--- a/testsuite/aplwc.lib/example.exp
+++ b/testsuite/aplwc.lib/example.exp
@@ -1,3 +1,2 @@
-spawn "${aplwc_bin}"
fail "not implemented"
diff --git a/testsuite/config/default.exp b/testsuite/config/default.exp
new file mode 100644
index 0000000..90967cc
--- /dev/null
+++ b/testsuite/config/default.exp
@@ -0,0 +1 @@
+load_lib "standard.exp"
diff --git a/testsuite/lib/aplwc.exp b/testsuite/lib/aplwc.exp
new file mode 100644
index 0000000..e5b59e7
--- /dev/null
+++ b/testsuite/lib/aplwc.exp
@@ -0,0 +1,6 @@
+proc aplwc_start { args } {
+ global APLWC
+ global spawn_id
+ spawn $APLWC {*}$args
+}
+
diff --git a/testsuite/site_extra.exp.in b/testsuite/site_extra.exp.in
index 819c30f..a58bfa6 100644
--- a/testsuite/site_extra.exp.in
+++ b/testsuite/site_extra.exp.in
@@ -1 +1 @@
-set aplwc_bin @abs_top_builddir@/src/aplwc
+set APLWC @abs_top_builddir@/src/aplwc