summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorRyan Geary <rtgnj42@gmail.com>2022-04-23 15:16:32 -0400
committerRyan Geary <7076013+theryangeary@users.noreply.github.com>2022-04-23 17:26:21 -0400
commitbd32530e84c960897c56f856448c93e0480ffc4d (patch)
tree47828e6a78305dbdfba959a1e15697f15eaa3454 /test
parent97b3abf5204badf60eb79be6be07285bdef83049 (diff)
Fix positive start, negative end, length 1 choice is empty
Diffstat (limited to 'test')
-rw-r--r--test/choose_1x-1.txt19
-rw-r--r--test/choose_1x-2.txt19
-rw-r--r--test/choose_1x-3.txt19
-rwxr-xr-xtest/e2e_test.sh3
4 files changed, 60 insertions, 0 deletions
diff --git a/test/choose_1x-1.txt b/test/choose_1x-1.txt
new file mode 100644
index 0000000..33a230e
--- /dev/null
+++ b/test/choose_1x-1.txt
@@ -0,0 +1,19 @@
+
+c
+e f
+
+h i
+k
+
+
+
+o
+q r
+
+t u
+w
+
+
+
+
+
diff --git a/test/choose_1x-2.txt b/test/choose_1x-2.txt
new file mode 100644
index 0000000..0544919
--- /dev/null
+++ b/test/choose_1x-2.txt
@@ -0,0 +1,19 @@
+
+
+e
+
+h
+
+
+
+
+
+q
+
+t
+
+
+
+
+
+
diff --git a/test/choose_1x-3.txt b/test/choose_1x-3.txt
new file mode 100644
index 0000000..a60f303
--- /dev/null
+++ b/test/choose_1x-3.txt
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/e2e_test.sh b/test/e2e_test.sh
index 320521b..6fe58ff 100755
--- a/test/e2e_test.sh
+++ b/test/e2e_test.sh
@@ -21,6 +21,9 @@ diff -w <(cargo run -- 3:6 -c -i ${test_dir}/lorem.txt 2>/dev/null) <(cat "${tes
diff -w <(cargo run -- 2 -x -i ${test_dir}/lorem.txt 2>/dev/null) <(cat "${test_dir}/choose_2_x.txt")
diff -w <(cargo run -- -1 -i ${test_dir}/alphabet.txt 2>/dev/null) <(cat "${test_dir}/choose_-1.txt")
diff -w <(cargo run -- -2 -i ${test_dir}/alphabet.txt 2>/dev/null) <(cat "${test_dir}/choose_-2.txt")
+diff -w <(cargo run -- 1:-1 -i ${test_dir}/alphabet.txt 2>/dev/null) <(cat "${test_dir}/choose_1x-1.txt")
+diff -w <(cargo run -- 1:-2 -i ${test_dir}/alphabet.txt 2>/dev/null) <(cat "${test_dir}/choose_1x-2.txt")
+diff -w <(cargo run -- 1:-3 -i ${test_dir}/alphabet.txt 2>/dev/null) <(cat "${test_dir}/choose_1x-3.txt")
# add tests for different delimiters
# add tests using piping