From 57ed8a41150212f290a87b19ceb29a5ac6a34df1 Mon Sep 17 00:00:00 2001 From: pgen Date: Sun, 30 Apr 2023 21:12:15 +0200 Subject: New feature: define attributes for columns/rows The -C and -R options now have a new directive that allows you to define attributes (colors, ...) for a set of rows and columns. --- tests/attributes/t0008.good | 21 +++++++++++++++++++++ tests/attributes/t0008.in | 1 + tests/attributes/t0008.tst | 5 +++++ tests/attributes/t0009.good | 21 +++++++++++++++++++++ tests/attributes/t0009.in | 1 + tests/attributes/t0009.tst | 5 +++++ 6 files changed, 54 insertions(+) create mode 100644 tests/attributes/t0008.good create mode 120000 tests/attributes/t0008.in create mode 100644 tests/attributes/t0008.tst create mode 100644 tests/attributes/t0009.good create mode 120000 tests/attributes/t0009.in create mode 100644 tests/attributes/t0009.tst (limited to 'tests') diff --git a/tests/attributes/t0008.good b/tests/attributes/t0008.good new file mode 100644 index 0000000..f298b54 --- /dev/null +++ b/tests/attributes/t0008.good @@ -0,0 +1,21 @@ +$ OUT=$(smenu -P -N 0 -ai:6 s:5,b -c -C a-2:1,4-6:2,8-:3 \ + +> -R a/20/:4+rb -- t0008.in) + +◀ 2 3 4 5 6 7 8 ▶ ┐ +0:0123 7:1f 8:1f 9:1f 17:010722 18:010722 19:010722 27:20 28:20 29:20 37:07 38:07 39:07 47:20 48:20 49:20 57:010722 58:010722 59:010722 67:21 68:21 69:21 70:0123 79:20 +◀ 33 34 35 36 37 38 39 ▶ █ +0:0123 7:1f 8:1f 9:1f 17:24 18:24 19:24 27:20 28:20 29:20 37:20 38:20 39:20 47:20 48:20 49:20 57:24 58:24 59:24 67:21 68:21 69:21 70:0123 79:20 +◀ 62 63 64 65 66 67 68 ▶ │ +0:0123 7:1f 8:1f 9:1f 17:24 18:24 19:24 27:20 28:20 29:20 37:20 38:20 39:20 47:20 48:20 49:20 57:24 58:24 59:24 67:21 68:21 69:21 70:0123 79:20 +◀ 12) 102 13) 103 14) 104 15) 105 16) 106 17) 107 18) 108▶ │ +0:0123 1:01 2:01 3:01 4:01 5:01 7:1f 8:1f 9:1f 11:01 12:01 13:01 14:01 15:01 17:010722 18:010722 19:010722 21:01 22:01 23:01 24:01 25:01 27:20 28:20 29:20 31:01 32:01 33:01 34:01 35:01 37:20 38:20 39:20 41:01 42:01 43:01 44:01 45:01 47:20 48:20 49:20 51:01 52:01 53:01 54:01 55:01 57:010722 58:010722 59:010722 61:01 62:01 63:01 64:01 65:01 67:21 68:21 69:21 70:0123 79:20 +◀ 132 133 134 135 136 137 138▶ ▼ +0:0123 7:1f 8:1f 9:1f 17:24 18:24 19:24 27:20 28:20 29:20 37:20 38:20 39:20 47:20 48:20 49:20 57:24 58:24 59:24 67:21 68:21 69:21 70:0123 79:20 +$ + +$ echo ":$OUT:" + +:5: + +$ exit 0 diff --git a/tests/attributes/t0008.in b/tests/attributes/t0008.in new file mode 120000 index 0000000..cdca2c1 --- /dev/null +++ b/tests/attributes/t0008.in @@ -0,0 +1 @@ +data3 \ No newline at end of file diff --git a/tests/attributes/t0008.tst b/tests/attributes/t0008.tst new file mode 100644 index 0000000..e7e2fbb --- /dev/null +++ b/tests/attributes/t0008.tst @@ -0,0 +1,5 @@ +\S[150]\s[10]OUT=$(smenu -P -N 0 -ai:6 s:5,b -c -C a-2:1,4-6:2,8-:3 \\ +-R a/20/:4+rb -- t0008.in) +\S[150]\s[50]llll>\r +\S[150]\s[10]echo ":$\s[10]OUT:" +exit 0 diff --git a/tests/attributes/t0009.good b/tests/attributes/t0009.good new file mode 100644 index 0000000..709e5e0 --- /dev/null +++ b/tests/attributes/t0009.good @@ -0,0 +1,21 @@ +$ OUT=$(smenu -P -N 0 -ai:6 s:5,b -c -R a/20/:4+rb \ + +> -C a-2:1,4-6:2,8-:3 -- t0009.in) + +◀ 2 3 4 5 6 7 8 ▶ ┐ +0:0123 7:010722 8:010722 9:010722 17:010722 18:010722 19:010722 27:010722 28:010722 29:010722 37:07 38:07 39:07 47:010722 48:010722 49:010722 57:010722 58:010722 59:010722 67:010722 68:010722 69:010722 70:0123 79:20 +◀ 33 34 35 36 37 38 39 ▶ █ +0:0123 7:1f 8:1f 9:1f 17:24 18:24 19:24 27:20 28:20 29:20 37:20 38:20 39:20 47:20 48:20 49:20 57:24 58:24 59:24 67:21 68:21 69:21 70:0123 79:20 +◀ 62 63 64 65 66 67 68 ▶ │ +0:0123 7:1f 8:1f 9:1f 17:24 18:24 19:24 27:20 28:20 29:20 37:20 38:20 39:20 47:20 48:20 49:20 57:24 58:24 59:24 67:21 68:21 69:21 70:0123 79:20 +◀ 12) 102 13) 103 14) 104 15) 105 16) 106 17) 107 18) 108▶ │ +0:0123 1:01 2:01 3:01 4:01 5:01 7:010722 8:010722 9:010722 11:01 12:01 13:01 14:01 15:01 17:010722 18:010722 19:010722 21:01 22:01 23:01 24:01 25:01 27:010722 28:010722 29:010722 31:01 32:01 33:01 34:01 35:01 37:010722 38:010722 39:010722 41:01 42:01 43:01 44:01 45:01 47:010722 48:010722 49:010722 51:01 52:01 53:01 54:01 55:01 57:010722 58:010722 59:010722 61:01 62:01 63:01 64:01 65:01 67:010722 68:010722 69:010722 70:0123 79:20 +◀ 132 133 134 135 136 137 138▶ ▼ +0:0123 7:1f 8:1f 9:1f 17:24 18:24 19:24 27:20 28:20 29:20 37:20 38:20 39:20 47:20 48:20 49:20 57:24 58:24 59:24 67:21 68:21 69:21 70:0123 79:20 +$ + +$ echo ":$OUT:" + +:5: + +$ exit 0 diff --git a/tests/attributes/t0009.in b/tests/attributes/t0009.in new file mode 120000 index 0000000..cdca2c1 --- /dev/null +++ b/tests/attributes/t0009.in @@ -0,0 +1 @@ +data3 \ No newline at end of file diff --git a/tests/attributes/t0009.tst b/tests/attributes/t0009.tst new file mode 100644 index 0000000..cc31c3b --- /dev/null +++ b/tests/attributes/t0009.tst @@ -0,0 +1,5 @@ +\S[150]\s[10]OUT=$(smenu -P -N 0 -ai:6 s:5,b -c -R a/20/:4+rb \\ +-C a-2:1,4-6:2,8-:3 -- t0009.in) +\S[150]\s[50]llll>\r +\S[150]\s[10]echo ":$\s[10]OUT:" +exit 0 -- cgit v1.2.3