summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorpgen <p.gen.progs@gmail.com>2018-05-14 23:39:21 +0200
committerpgen <p.gen.progs@gmail.com>2018-05-14 23:56:08 +0200
commit8cb7c09a73c443a8f8257a7ac6a99c6a3ae8014b (patch)
tree33b86f5838d234b4c48ae2cf6877f4d5d7a7be65 /tests
parente63bf6c08d6546fd5438dd15dec285fac754d676 (diff)
Add some tests for the -x/-X options
Diffstat (limited to 'tests')
-rw-r--r--tests/timeout/data11
-rw-r--r--tests/timeout/t0001.good13
l---------tests/timeout/t0001.in1
-rw-r--r--tests/timeout/t0001.tst4
-rw-r--r--tests/timeout/t0002.good13
l---------tests/timeout/t0002.in1
-rw-r--r--tests/timeout/t0002.tst4
-rw-r--r--tests/timeout/t0003.good13
l---------tests/timeout/t0003.in1
-rw-r--r--tests/timeout/t0003.tst4
-rw-r--r--tests/timeout/t0004.good13
l---------tests/timeout/t0004.in1
-rw-r--r--tests/timeout/t0004.tst4
-rw-r--r--tests/timeout/t0005.good13
l---------tests/timeout/t0005.in1
-rw-r--r--tests/timeout/t0005.tst4
-rw-r--r--tests/timeout/t0006.good11
l---------tests/timeout/t0006.in1
-rw-r--r--tests/timeout/t0006.tst4
19 files changed, 107 insertions, 0 deletions
diff --git a/tests/timeout/data1 b/tests/timeout/data1
new file mode 100644
index 0000000..3774da6
--- /dev/null
+++ b/tests/timeout/data1
@@ -0,0 +1 @@
+a b c
diff --git a/tests/timeout/t0001.good b/tests/timeout/t0001.good
new file mode 100644
index 0000000..341963a
--- /dev/null
+++ b/tests/timeout/t0001.good
@@ -0,0 +1,13 @@
+$ OUT=$(smenu -x cur 5 -- t0001.in)
+
+[ 0s before selecting the current highlighted word]
+0:01 1:01 2:01 3:01 4:01 5:01 6:01 7:01 8:01 9:01 10:01 11:01 12:01 13:01 14:01 15:01 16:01 17:01 18:01 19:01 20:01 21:01 22:01 23:01 24:01 25:01 26:01 27:01 28:01 29:01 30:01 31:01 32:01 33:01 34:01 35:01 36:01 37:01 38:01 39:01 40:01 41:01 42:01 43:01 44:01 45:01 46:01 47:01 48:01 49:01 50:01 51:01 52:01 53:01
+a b c
+2:07
+$
+
+$ echo ":$OUT:"
+
+:b:
+
+$ exit 0
diff --git a/tests/timeout/t0001.in b/tests/timeout/t0001.in
new file mode 120000
index 0000000..0abc8f1
--- /dev/null
+++ b/tests/timeout/t0001.in
@@ -0,0 +1 @@
+data1 \ No newline at end of file
diff --git a/tests/timeout/t0001.tst b/tests/timeout/t0001.tst
new file mode 100644
index 0000000..42be402
--- /dev/null
+++ b/tests/timeout/t0001.tst
@@ -0,0 +1,4 @@
+\S[10]OUT=$(smenu -x cur 5 -- t0001.in)
+\S[100]\s[120]l\S[6000]
+\s[0]echo ":$OUT:"
+exit 0
diff --git a/tests/timeout/t0002.good b/tests/timeout/t0002.good
new file mode 100644
index 0000000..01777c2
--- /dev/null
+++ b/tests/timeout/t0002.good
@@ -0,0 +1,13 @@
+$ OUT=$(smenu -x cur 5 -- t0002.in)
+
+[ 0s before selecting the current highlighted word]
+0:01 1:01 2:01 3:01 4:01 5:01 6:01 7:01 8:01 9:01 10:01 11:01 12:01 13:01 14:01 15:01 16:01 17:01 18:01 19:01 20:01 21:01 22:01 23:01 24:01 25:01 26:01 27:01 28:01 29:01 30:01 31:01 32:01 33:01 34:01 35:01 36:01 37:01 38:01 39:01 40:01 41:01 42:01 43:01 44:01 45:01 46:01 47:01 48:01 49:01 50:01 51:01 52:01 53:01
+a b c
+0:07
+$
+
+$ echo ":$OUT:"
+
+:a:
+
+$ exit 0
diff --git a/tests/timeout/t0002.in b/tests/timeout/t0002.in
new file mode 120000
index 0000000..0abc8f1
--- /dev/null
+++ b/tests/timeout/t0002.in
@@ -0,0 +1 @@
+data1 \ No newline at end of file
diff --git a/tests/timeout/t0002.tst b/tests/timeout/t0002.tst
new file mode 100644
index 0000000..54cc57a
--- /dev/null
+++ b/tests/timeout/t0002.tst
@@ -0,0 +1,4 @@
+\S[10]OUT=$(smenu -x cur 5 -- t0002.in)
+\S[100]\s[120]l\S[2000]l\S[2000]hh\S[6000]
+\s[0]echo ":$OUT:"
+exit 0
diff --git a/tests/timeout/t0003.good b/tests/timeout/t0003.good
new file mode 100644
index 0000000..cb47092
--- /dev/null
+++ b/tests/timeout/t0003.good
@@ -0,0 +1,13 @@
+$ OUT=$(smenu -x q 5 -- t0003.in)
+
+[ 0s before quitting without selecting anything]
+0:01 1:01 2:01 3:01 4:01 5:01 6:01 7:01 8:01 9:01 10:01 11:01 12:01 13:01 14:01 15:01 16:01 17:01 18:01 19:01 20:01 21:01 22:01 23:01 24:01 25:01 26:01 27:01 28:01 29:01 30:01 31:01 32:01 33:01 34:01 35:01 36:01 37:01 38:01 39:01 40:01 41:01 42:01 43:01 44:01 45:01 46:01 47:01 48:01 49:01 50:01
+a b c
+2:07
+$
+
+$ echo ":$OUT:"
+
+::
+
+$ exit 0
diff --git a/tests/timeout/t0003.in b/tests/timeout/t0003.in
new file mode 120000
index 0000000..0abc8f1
--- /dev/null
+++ b/tests/timeout/t0003.in
@@ -0,0 +1 @@
+data1 \ No newline at end of file
diff --git a/tests/timeout/t0003.tst b/tests/timeout/t0003.tst
new file mode 100644
index 0000000..6d88589
--- /dev/null
+++ b/tests/timeout/t0003.tst
@@ -0,0 +1,4 @@
+\S[10]OUT=$(smenu -x q 5 -- t0003.in)
+\S[100]\s[120]l\S[6000]
+\s[0]echo ":$OUT:"
+exit 0
diff --git a/tests/timeout/t0004.good b/tests/timeout/t0004.good
new file mode 100644
index 0000000..76b3c1e
--- /dev/null
+++ b/tests/timeout/t0004.good
@@ -0,0 +1,13 @@
+$ OUT=$(smenu -x w 'test\u21' 5 -- t0004.in)
+
+[ 0s before selecting the word "test!"]
+0:01 1:01 2:01 3:01 4:01 5:01 6:01 7:01 8:01 9:01 10:01 11:01 12:01 13:01 14:01 15:01 16:01 17:01 18:01 19:01 20:01 21:01 22:01 23:01 24:01 25:01 26:01 27:01 28:01 29:01 30:01 31:01 32:01 33:01 34:01 35:01 36:01 37:01 38:01 39:01 40:01 41:01
+a b c
+2:07
+$
+
+$ echo ":$OUT:"
+
+:test!:
+
+$ exit 0
diff --git a/tests/timeout/t0004.in b/tests/timeout/t0004.in
new file mode 120000
index 0000000..0abc8f1
--- /dev/null
+++ b/tests/timeout/t0004.in
@@ -0,0 +1 @@
+data1 \ No newline at end of file
diff --git a/tests/timeout/t0004.tst b/tests/timeout/t0004.tst
new file mode 100644
index 0000000..f6bff49
--- /dev/null
+++ b/tests/timeout/t0004.tst
@@ -0,0 +1,4 @@
+\S[10]OUT=$(smenu -x w 'test\\u21' 5 -- t0004.in)
+\S[100]\s[120]l\S[6000]
+\s[0]echo ":$OUT:"
+exit 0
diff --git a/tests/timeout/t0005.good b/tests/timeout/t0005.good
new file mode 100644
index 0000000..f7a9fb3
--- /dev/null
+++ b/tests/timeout/t0005.good
@@ -0,0 +1,13 @@
+$ OUT=$(smenu -x cur 5 -- t0005.in)
+
+[ 3s before selecting the current highlighted word]
+0:01 1:01 2:01 3:01 4:01 5:01 6:01 7:01 8:01 9:01 10:01 11:01 12:01 13:01 14:01 15:01 16:01 17:01 18:01 19:01 20:01 21:01 22:01 23:01 24:01 25:01 26:01 27:01 28:01 29:01 30:01 31:01 32:01 33:01 34:01 35:01 36:01 37:01 38:01 39:01 40:01 41:01 42:01 43:01 44:01 45:01 46:01 47:01 48:01 49:01 50:01 51:01 52:01 53:01
+a b c
+2:07
+$
+
+$ echo ":$OUT:"
+
+:b:
+
+$ exit 0
diff --git a/tests/timeout/t0005.in b/tests/timeout/t0005.in
new file mode 120000
index 0000000..0abc8f1
--- /dev/null
+++ b/tests/timeout/t0005.in
@@ -0,0 +1 @@
+data1 \ No newline at end of file
diff --git a/tests/timeout/t0005.tst b/tests/timeout/t0005.tst
new file mode 100644
index 0000000..c04cf96
--- /dev/null
+++ b/tests/timeout/t0005.tst
@@ -0,0 +1,4 @@
+\S[10]OUT=$(smenu -x cur 5 -- t0005.in)
+\S[100]\s[120]l\S[2000]\r
+\s[0]echo ":$OUT:"
+exit 0
diff --git a/tests/timeout/t0006.good b/tests/timeout/t0006.good
new file mode 100644
index 0000000..79011d3
--- /dev/null
+++ b/tests/timeout/t0006.good
@@ -0,0 +1,11 @@
+$ OUT=$(smenu -X cur 5 -- t0001.in)
+
+a b c
+2:07
+$
+
+$ echo ":$OUT:"
+
+:b:
+
+$ exit 0
diff --git a/tests/timeout/t0006.in b/tests/timeout/t0006.in
new file mode 120000
index 0000000..0abc8f1
--- /dev/null
+++ b/tests/timeout/t0006.in
@@ -0,0 +1 @@
+data1 \ No newline at end of file
diff --git a/tests/timeout/t0006.tst b/tests/timeout/t0006.tst
new file mode 100644
index 0000000..89cddb8
--- /dev/null
+++ b/tests/timeout/t0006.tst
@@ -0,0 +1,4 @@
+\S[10]OUT=$(smenu -X cur 5 -- t0001.in)
+\S[100]\s[120]l\S[3000]\r
+\s[0]echo ":$OUT:"
+exit 0