From 87c07fcb7b155c3a781e50cbfdfd33c0ff2a5880 Mon Sep 17 00:00:00 2001
From: pgen
Date: Fri, 3 Jul 2020 23:43:57 +0200
Subject: Add more tests for tabulation_mode
---
tests/tabulating_mode/data6 | 6 ++++++
tests/tabulating_mode/t0006.good | 11 +++++++++++
tests/tabulating_mode/t0006.in | 1 +
tests/tabulating_mode/t0006.tst | 4 ++++
tests/tabulating_mode/t0007.good | 15 +++++++++++++++
tests/tabulating_mode/t0007.in | 1 +
tests/tabulating_mode/t0007.tst | 4 ++++
tests/tabulating_mode/t0011.good | 19 +++++++++++++++++++
tests/tabulating_mode/t0011.in | 1 +
tests/tabulating_mode/t0011.tst | 4 ++++
tests/tabulating_mode/t0012.good | 19 +++++++++++++++++++
tests/tabulating_mode/t0012.in | 1 +
tests/tabulating_mode/t0012.tst | 4 ++++
13 files changed, 90 insertions(+)
create mode 100644 tests/tabulating_mode/data6
create mode 100644 tests/tabulating_mode/t0006.good
create mode 120000 tests/tabulating_mode/t0006.in
create mode 100644 tests/tabulating_mode/t0006.tst
create mode 100644 tests/tabulating_mode/t0007.good
create mode 120000 tests/tabulating_mode/t0007.in
create mode 100644 tests/tabulating_mode/t0007.tst
create mode 100644 tests/tabulating_mode/t0011.good
create mode 120000 tests/tabulating_mode/t0011.in
create mode 100644 tests/tabulating_mode/t0011.tst
create mode 100644 tests/tabulating_mode/t0012.good
create mode 120000 tests/tabulating_mode/t0012.in
create mode 100644 tests/tabulating_mode/t0012.tst
(limited to 'tests')
diff --git a/tests/tabulating_mode/data6 b/tests/tabulating_mode/data6
new file mode 100644
index 0000000..26b71c3
--- /dev/null
+++ b/tests/tabulating_mode/data6
@@ -0,0 +1,6 @@
+1 2 3 4 5 6 7 8
+9 10 11 12 13 14
+1 2 3 4 5 6 7 8 9 10
+11 12 13 14
+1 2 3 4 5
+6 7 8 9 10 11 12 13 14
diff --git a/tests/tabulating_mode/t0006.good b/tests/tabulating_mode/t0006.good
new file mode 100644
index 0000000..4026b9e
--- /dev/null
+++ b/tests/tabulating_mode/t0006.good
@@ -0,0 +1,11 @@
+$ OUT=$(LC_ALL=en_US.UTF-8 smenu -t -- t0006.in)
+
+1 2 3 4 5 6 7 8 9 10 11 12 13 14
+3:07 4:07
+$
+
+$ echo ":$OUT:"
+
+:2:
+
+$ exit 0
diff --git a/tests/tabulating_mode/t0006.in b/tests/tabulating_mode/t0006.in
new file mode 120000
index 0000000..0abc8f1
--- /dev/null
+++ b/tests/tabulating_mode/t0006.in
@@ -0,0 +1 @@
+data1
\ No newline at end of file
diff --git a/tests/tabulating_mode/t0006.tst b/tests/tabulating_mode/t0006.tst
new file mode 100644
index 0000000..46adbf4
--- /dev/null
+++ b/tests/tabulating_mode/t0006.tst
@@ -0,0 +1,4 @@
+\S[150]\s[10]OUT=$(LC_ALL=en_US.UTF-8 smenu -t -- t0006.in)
+\S[150]\s[150]lj\r
+\S[150]\s[10]echo ":$\s[10]OUT:"
+exit 0
diff --git a/tests/tabulating_mode/t0007.good b/tests/tabulating_mode/t0007.good
new file mode 100644
index 0000000..d72788e
--- /dev/null
+++ b/tests/tabulating_mode/t0007.good
@@ -0,0 +1,15 @@
+$ OUT=$(LC_ALL=en_US.UTF-8 smenu -t -L$'\n' t0007.in)
+
+1 2 3 4 5
+
+6 7 8
+3:07 4:07
+9 10 11 12 13 14
+
+$
+
+$ echo ":$OUT:"
+
+:7:
+
+$ exit 0
diff --git a/tests/tabulating_mode/t0007.in b/tests/tabulating_mode/t0007.in
new file mode 120000
index 0000000..0abc8f1
--- /dev/null
+++ b/tests/tabulating_mode/t0007.in
@@ -0,0 +1 @@
+data1
\ No newline at end of file
diff --git a/tests/tabulating_mode/t0007.tst b/tests/tabulating_mode/t0007.tst
new file mode 100644
index 0000000..0231846
--- /dev/null
+++ b/tests/tabulating_mode/t0007.tst
@@ -0,0 +1,4 @@
+\S[150]\s[10]OUT=$(LC_ALL=en_US.UTF-8 smenu -t -L$'\\n' t0007.in)
+\S[150]\s[150]lj\r
+\S[150]\s[10]echo ":$\s[10]OUT:"
+exit 0
diff --git a/tests/tabulating_mode/t0011.good b/tests/tabulating_mode/t0011.good
new file mode 100644
index 0000000..e99e519
--- /dev/null
+++ b/tests/tabulating_mode/t0011.good
@@ -0,0 +1,19 @@
+$ OUT=$(smenu -tab 5 --line-delimiters 6 t0011.in)
+
+1 2 3 4 5 ┐
+16:20
+7 8 9 10 11 │
+16:20
+12 13 14 1 2 ║
+16:20
+3 4 5 │
+16:20
+7 8 9 10 11 ▼
+3:07 4:07 16:20
+$
+
+$ echo ":$OUT:"
+
+:8:
+
+$ exit 0
diff --git a/tests/tabulating_mode/t0011.in b/tests/tabulating_mode/t0011.in
new file mode 120000
index 0000000..e3d8d27
--- /dev/null
+++ b/tests/tabulating_mode/t0011.in
@@ -0,0 +1 @@
+data6
\ No newline at end of file
diff --git a/tests/tabulating_mode/t0011.tst b/tests/tabulating_mode/t0011.tst
new file mode 100644
index 0000000..4315821
--- /dev/null
+++ b/tests/tabulating_mode/t0011.tst
@@ -0,0 +1,4 @@
+\S[150]\s[10]OUT=$(smenu -tab 5 --line-delimiters 6 t0011.in)
+\S[150]\s[150]ljljljhj\r
+\S[150]\s[10]echo ":$\s[10]OUT:"
+exit 0
diff --git a/tests/tabulating_mode/t0012.good b/tests/tabulating_mode/t0012.good
new file mode 100644
index 0000000..32c1d09
--- /dev/null
+++ b/tests/tabulating_mode/t0012.good
@@ -0,0 +1,19 @@
+$ OUT=$(smenu -tab 5 t0012.in)
+
+1 2 3 4 5 ┐
+16:20
+6 7 8 9 10 │
+16:20
+11 12 13 14 1 ║
+16:20
+2 3 4 5 6 │
+16:20
+7 8 9 10 11 ▼
+6:07 7:07 16:20
+$
+
+$ echo ":$OUT:"
+
+:9:
+
+$ exit 0
diff --git a/tests/tabulating_mode/t0012.in b/tests/tabulating_mode/t0012.in
new file mode 120000
index 0000000..e3d8d27
--- /dev/null
+++ b/tests/tabulating_mode/t0012.in
@@ -0,0 +1 @@
+data6
\ No newline at end of file
diff --git a/tests/tabulating_mode/t0012.tst b/tests/tabulating_mode/t0012.tst
new file mode 100644
index 0000000..2a6bb49
--- /dev/null
+++ b/tests/tabulating_mode/t0012.tst
@@ -0,0 +1,4 @@
+\S[150]\s[10]OUT=$(smenu -tab 5 t0012.in)
+\S[150]\s[150]ljljljhj\r
+\S[150]\s[10]echo ":$\s[10]OUT:"
+exit 0
--
cgit v1.2.3