From 535a392b90d450da1ea19a50f5ff1f8c6c11420c Mon Sep 17 00:00:00 2001 From: pgen Date: Thu, 27 Sep 2018 23:21:54 +0200 Subject: Add tests in the search tests directory --- tests/search/data5 | 6 ++++++ tests/search/t0026.good | 11 +++++++++++ tests/search/t0026.in | 1 + tests/search/t0026.tst | 4 ++++ tests/search/t0027.good | 21 +++++++++++++++++++++ tests/search/t0027.in | 1 + tests/search/t0027.tst | 4 ++++ 7 files changed, 48 insertions(+) create mode 100644 tests/search/data5 create mode 100644 tests/search/t0026.good create mode 120000 tests/search/t0026.in create mode 100644 tests/search/t0026.tst create mode 100644 tests/search/t0027.good create mode 120000 tests/search/t0027.in create mode 100644 tests/search/t0027.tst diff --git a/tests/search/data5 b/tests/search/data5 new file mode 100644 index 0000000..170a7d2 --- /dev/null +++ b/tests/search/data5 @@ -0,0 +1,6 @@ +ab +ababab +abxab +" abab" +"abab " +" abab " diff --git a/tests/search/t0026.good b/tests/search/t0026.good new file mode 100644 index 0000000..5c1751a --- /dev/null +++ b/tests/search/t0026.good @@ -0,0 +1,11 @@ +$ OUT=$(smenu -n 0 -N -- t0026.in) + + 1) ab 2) ababab 3) abxab 4) abab 5) abab 6) abab +0:01 1:01 2:01 4:0723 5:0723 7:01 8:01 9:01 15:23 16:23 18:01 19:01 20:01 25:23 26:23 28:01 29:01 30:01 35:23 36:23 38:01 39:01 40:01 48:01 49:01 50:01 +$ + +$ echo ":$OUT:" + +:ab: + +$ exit 0 diff --git a/tests/search/t0026.in b/tests/search/t0026.in new file mode 120000 index 0000000..7c06dd2 --- /dev/null +++ b/tests/search/t0026.in @@ -0,0 +1 @@ +data5 \ No newline at end of file diff --git a/tests/search/t0026.tst b/tests/search/t0026.tst new file mode 100644 index 0000000..d194eba --- /dev/null +++ b/tests/search/t0026.tst @@ -0,0 +1,4 @@ +\S[150]\s[10]OUT=$(smenu -n 0 -N -- t0026.in) +\S[150]\s[150]~ab\CZ\rj\r +\S[150]\s[10]echo ":$\s[10]OUT:" +exit 0 diff --git a/tests/search/t0027.good b/tests/search/t0027.good new file mode 100644 index 0000000..8b41e1c --- /dev/null +++ b/tests/search/t0027.good @@ -0,0 +1,21 @@ +$ OUT=$(smenu -n 0 -N -c t0026.in) + + 1) ab +0:01 1:01 2:01 4:23 5:23 + 2) ababab +0:01 1:01 2:01 4:07 5:07 6:07 7:07 8:0723 9:0723 + 3) abxab +0:01 1:01 2:01 7:23 8:23 + 4) abab +0:01 1:01 2:01 7:23 8:23 + 5) abab +0:01 1:01 2:01 + 6) abab +0:01 1:01 2:01 +$ + +$ echo ":$OUT:" + +:ababab: + +$ exit 0 diff --git a/tests/search/t0027.in b/tests/search/t0027.in new file mode 120000 index 0000000..7c06dd2 --- /dev/null +++ b/tests/search/t0027.in @@ -0,0 +1 @@ +data5 \ No newline at end of file diff --git a/tests/search/t0027.tst b/tests/search/t0027.tst new file mode 100644 index 0000000..675b1d8 --- /dev/null +++ b/tests/search/t0027.tst @@ -0,0 +1,4 @@ +\S[150]\s[10]OUT=$(smenu -n 0 -N -c t0026.in) +\S[150]\s[150]~ab\CZ\rj\r +\S[150]\s[10]echo ":$\s[10]OUT:" +exit 0 -- cgit v1.2.3