summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpgen <p.gen.progs@gmail.com>2023-10-14 11:16:12 +0200
committerpgen <p.gen.progs@gmail.com>2023-10-14 11:16:12 +0200
commit9f041c807a058f22d5612d629728d151dc6c8720 (patch)
tree6ca41fb961f2876a4fb8f09ebbe3c849f728a3a9
parent8cf08fc2abcd79554551646f313c784f62fa9c07 (diff)
Add tests for moving to the start or end of line
-rw-r--r--tests/first_last/data16
-rw-r--r--tests/first_last/t0001.good19
l---------tests/first_last/t0001.in1
-rw-r--r--tests/first_last/t0001.tst4
-rw-r--r--tests/first_last/t0002.good19
l---------tests/first_last/t0002.in1
-rw-r--r--tests/first_last/t0002.tst4
7 files changed, 54 insertions, 0 deletions
diff --git a/tests/first_last/data1 b/tests/first_last/data1
new file mode 100644
index 0000000..591c027
--- /dev/null
+++ b/tests/first_last/data1
@@ -0,0 +1,6 @@
+1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
+32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
+61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
+101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
+131 132 133 134 135 136 137 138 139 140
+141 142 143 144 145 146 147 148 149 150
diff --git a/tests/first_last/t0001.good b/tests/first_last/t0001.good
new file mode 100644
index 0000000..81e0701
--- /dev/null
+++ b/tests/first_last/t0001.good
@@ -0,0 +1,19 @@
+$ OUT=$(smenu -c -e 3 t0001.in)
+
+◀11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 ▶ ┐
+0:20 9:24 10:24 11:24 49:24 50:24 51:24 73:07 74:07 75:07 76:20 79:20
+◀42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 █
+0:20 5:24 6:24 7:24 45:24 46:24 47:24 79:20
+◀71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 ▶ │
+0:20 9:24 10:24 11:24 49:24 50:24 51:24 76:20 79:20
+◀111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129▶ │
+0:20 9:24 10:24 11:24 49:24 50:24 51:24 76:20 79:20
+◀ ▼
+0:20 79:20
+$
+
+$ echo ":$OUT:"
+
+:29:
+
+$ exit 0
diff --git a/tests/first_last/t0001.in b/tests/first_last/t0001.in
new file mode 120000
index 0000000..0abc8f1
--- /dev/null
+++ b/tests/first_last/t0001.in
@@ -0,0 +1 @@
+data1 \ No newline at end of file
diff --git a/tests/first_last/t0001.tst b/tests/first_last/t0001.tst
new file mode 100644
index 0000000..45fc2a7
--- /dev/null
+++ b/tests/first_last/t0001.tst
@@ -0,0 +1,4 @@
+\S[150]\s[10]OUT=$(smenu -c -e 3 t0001.in)
+\S[150]\s[50]L\r
+\S[150]\s[10]echo ":$\s[10]OUT:"
+exit 0
diff --git a/tests/first_last/t0002.good b/tests/first_last/t0002.good
new file mode 100644
index 0000000..a45675c
--- /dev/null
+++ b/tests/first_last/t0002.good
@@ -0,0 +1,19 @@
+$ OUT=$(smenu -c -s 60 -e 3 t0002.in)
+
+◀9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 ▶ ┐
+0:20 17:24 18:24 19:24 57:24 58:24 59:24 76:20 79:20
+◀40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 ▶ █
+0:20 1:07 2:07 3:07 13:24 14:24 15:24 53:24 54:24 55:24 76:20 79:20
+◀69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 ▶ │
+0:20 17:24 18:24 19:24 57:24 58:24 59:24 76:20 79:20
+◀109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127▶ │
+0:20 17:24 18:24 19:24 57:24 58:24 59:24 76:20 79:20
+◀139 140 ▼
+0:20 1:24 2:24 3:24 79:20
+$
+
+$ echo ":$OUT:"
+
+:40:
+
+$ exit 0
diff --git a/tests/first_last/t0002.in b/tests/first_last/t0002.in
new file mode 120000
index 0000000..0abc8f1
--- /dev/null
+++ b/tests/first_last/t0002.in
@@ -0,0 +1 @@
+data1 \ No newline at end of file
diff --git a/tests/first_last/t0002.tst b/tests/first_last/t0002.tst
new file mode 100644
index 0000000..74ada7e
--- /dev/null
+++ b/tests/first_last/t0002.tst
@@ -0,0 +1,4 @@
+\S[150]\s[10]OUT=$(smenu -c -s 60 -e 3 t0002.in)
+\S[150]\s[50]H\r
+\S[150]\s[10]echo ":$\s[10]OUT:"
+exit 0