diff options
author | pgen <p.gen.progs@gmail.com> | 2020-11-05 01:02:10 +0100 |
---|---|---|
committer | pgen <p.gen.progs@gmail.com> | 2020-11-05 23:56:44 +0100 |
commit | 7565b4f672038241ef955094c03847279ae869fa (patch) | |
tree | 5589da63b9b9011d7de1bbdcb825928512c8659a /tests | |
parent | bd71bf83bcf5f73e647933d7caa95a6c1c86ea51 (diff) |
Add a option to define a string to be output on ^C
Also reduce some code duplication.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/misc/data1 | 1 | ||||
-rw-r--r-- | tests/misc/t0001.good | 11 | ||||
l--------- | tests/misc/t0001.in | 1 | ||||
-rw-r--r-- | tests/misc/t0001.tst | 4 | ||||
-rw-r--r-- | tests/misc/t0002.good | 11 | ||||
l--------- | tests/misc/t0002.in | 1 | ||||
-rw-r--r-- | tests/misc/t0002.tst | 4 |
7 files changed, 33 insertions, 0 deletions
diff --git a/tests/misc/data1 b/tests/misc/data1 new file mode 100644 index 0000000..3774da6 --- /dev/null +++ b/tests/misc/data1 @@ -0,0 +1 @@ +a b c diff --git a/tests/misc/t0001.good b/tests/misc/t0001.good new file mode 100644 index 0000000..b7b141e --- /dev/null +++ b/tests/misc/t0001.good @@ -0,0 +1,11 @@ +$ OUT=$(smenu -! "Interrupted by CTRL-C" t0001.in) + +a b c +2:07 +$ + +$ echo ":$OUT:" + +:Interrupted by CTRL-C: + +$ exit 0 diff --git a/tests/misc/t0001.in b/tests/misc/t0001.in new file mode 120000 index 0000000..0abc8f1 --- /dev/null +++ b/tests/misc/t0001.in @@ -0,0 +1 @@ +data1
\ No newline at end of file diff --git a/tests/misc/t0001.tst b/tests/misc/t0001.tst new file mode 100644 index 0000000..3fa1b02 --- /dev/null +++ b/tests/misc/t0001.tst @@ -0,0 +1,4 @@ +\S[150]\s[10]OUT=$(smenu -! "Interrupted by CTRL-C" t0001.in) +\S[150]\s[150]l\CC +\S[150]\s[10]echo ":$\s[10]OUT:" +exit 0 diff --git a/tests/misc/t0002.good b/tests/misc/t0002.good new file mode 100644 index 0000000..02d663b --- /dev/null +++ b/tests/misc/t0002.good @@ -0,0 +1,11 @@ +$ OUT=$(smenu t0001.in) + +a b c +2:07 +$ + +$ echo ":$OUT:" + +:: + +$ exit 0 diff --git a/tests/misc/t0002.in b/tests/misc/t0002.in new file mode 120000 index 0000000..0abc8f1 --- /dev/null +++ b/tests/misc/t0002.in @@ -0,0 +1 @@ +data1
\ No newline at end of file diff --git a/tests/misc/t0002.tst b/tests/misc/t0002.tst new file mode 100644 index 0000000..32e064d --- /dev/null +++ b/tests/misc/t0002.tst @@ -0,0 +1,4 @@ +\S[150]\s[10]OUT=$(smenu t0001.in) +\S[150]\s[150]l\CC +\S[150]\s[10]echo ":$\s[10]OUT:" +exit 0 |