diff options
| -rw-r--r-- | testsuite/Makefile.am | 1 | ||||
| -rw-r--r-- | testsuite/aplwc.bin/example.exp | 10 | ||||
| -rw-r--r-- | testsuite/aplwc.bin/version.exp | 10 | ||||
| -rw-r--r-- | testsuite/aplwc.lib/example.exp | 1 | ||||
| -rw-r--r-- | testsuite/config/default.exp | 1 | ||||
| -rw-r--r-- | testsuite/lib/aplwc.exp | 6 | ||||
| -rw-r--r-- | testsuite/site_extra.exp.in | 2 |
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 |