summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/choose_1:3of%.txt6
-rw-r--r--test/choose_1_3of%.txt6
-rw-r--r--test/choose_1_3of.txt6
-rwxr-xr-xtest/e2e_test.sh3
4 files changed, 21 insertions, 0 deletions
diff --git a/test/choose_1:3of%.txt b/test/choose_1:3of%.txt
new file mode 100644
index 0000000..a0fa11f
--- /dev/null
+++ b/test/choose_1:3of%.txt
@@ -0,0 +1,6 @@
+ipsum%dolor%sit
+ut%labore%et
+exercitation%ullamco%laboris
+aute%irure%dolor
+nulla%pariatur.%Excepteur
+qui%officia%deserunt
diff --git a/test/choose_1_3of%.txt b/test/choose_1_3of%.txt
new file mode 100644
index 0000000..351efb1
--- /dev/null
+++ b/test/choose_1_3of%.txt
@@ -0,0 +1,6 @@
+ipsum%sit
+ut%et
+exercitation%laboris
+aute%dolor
+nulla%Excepteur
+qui%deserunt
diff --git a/test/choose_1_3of.txt b/test/choose_1_3of.txt
new file mode 100644
index 0000000..614b128
--- /dev/null
+++ b/test/choose_1_3of.txt
@@ -0,0 +1,6 @@
+ipsumsit
+utet
+exercitationlaboris
+autedolor
+nullaExcepteur
+quideserunt
diff --git a/test/e2e_test.sh b/test/e2e_test.sh
index a415961..69ddd54 100755
--- a/test/e2e_test.sh
+++ b/test/e2e_test.sh
@@ -14,6 +14,9 @@ diff -w <(cargo run -- 9 -i ${test_dir}/lorem.txt 2>/dev/null) <(cat "${test_dir
diff -w <(cargo run -- 12 -i ${test_dir}/lorem.txt 2>/dev/null) <(cat "${test_dir}/choose_12.txt")
diff -w <(cargo run -- 4:2 -i ${test_dir}/lorem.txt 2>/dev/null) <(cat "${test_dir}/choose_4:2.txt")
diff -w <(cargo run -- -4:-2 -i ${test_dir}/lorem.txt 2>/dev/null) <(cat "${test_dir}/choose_-4:-2.txt")
+diff -w <(cargo run -- 1:3 -o % -i ${test_dir}/lorem.txt 2>/dev/null) <(cat "${test_dir}/choose_1:3of%.txt")
+diff -w <(cargo run -- 1 3 -o % -i ${test_dir}/lorem.txt 2>/dev/null) <(cat "${test_dir}/choose_1_3of%.txt")
+diff -w <(cargo run -- 1 3 -o '' -i ${test_dir}/lorem.txt 2>/dev/null) <(cat "${test_dir}/choose_1_3of.txt")
# add tests for different delimiters
# add tests using piping