summaryrefslogtreecommitdiff
path: root/tests/unit/core/test-eval.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/core/test-eval.cpp')
-rw-r--r--tests/unit/core/test-eval.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/unit/core/test-eval.cpp b/tests/unit/core/test-eval.cpp
index e0bd236b7..14f60f80b 100644
--- a/tests/unit/core/test-eval.cpp
+++ b/tests/unit/core/test-eval.cpp
@@ -237,6 +237,42 @@ TEST(Eval, EvalExpression)
WEE_CHECK_EVAL("te+", "${cut:2,+,test}");
WEE_CHECK_EVAL("te+", "${cutscr:2,+,test}");
+ WEE_CHECK_EVAL("tes", "${cut:3,,test}");
+ WEE_CHECK_EVAL("tes", "${cutscr:3,,test}");
+ WEE_CHECK_EVAL("tes", "${cut:+3,,test}");
+ WEE_CHECK_EVAL("tes", "${cutscr:+3,,test}");
+
+ WEE_CHECK_EVAL("tes+", "${cut:3,+,test}");
+ WEE_CHECK_EVAL("tes+", "${cutscr:3,+,test}");
+ WEE_CHECK_EVAL("tes++", "${cut:3,++,test}");
+ WEE_CHECK_EVAL("tes++", "${cutscr:3,++,test}");
+ WEE_CHECK_EVAL("tes+++", "${cut:3,+++,test}");
+ WEE_CHECK_EVAL("tes+++", "${cutscr:3,+++,test}");
+ WEE_CHECK_EVAL("tes++++", "${cut:3,++++,test}");
+ WEE_CHECK_EVAL("tes++++", "${cutscr:3,++++,test}");
+ WEE_CHECK_EVAL("tes…", "${cut:3,…,test}");
+ WEE_CHECK_EVAL("tes…", "${cutscr:3,…,test}");
+ WEE_CHECK_EVAL("te+", "${cut:+3,+,test}");
+ WEE_CHECK_EVAL("te+", "${cutscr:+3,+,test}");
+ WEE_CHECK_EVAL("…", "${cut:+3,…,test}");
+ WEE_CHECK_EVAL("te…", "${cutscr:+3,…,test}");
+ WEE_CHECK_EVAL("t++", "${cut:+3,++,test}");
+ WEE_CHECK_EVAL("t++", "${cutscr:+3,++,test}");
+ WEE_CHECK_EVAL("+++", "${cut:+3,+++,test}");
+ WEE_CHECK_EVAL("+++", "${cutscr:+3,+++,test}");
+ WEE_CHECK_EVAL("", "${cut:+3,++++,test}");
+ WEE_CHECK_EVAL("", "${cutscr:+3,++++,test}");
+
+ WEE_CHECK_EVAL("test", "${cut:4,,test}");
+ WEE_CHECK_EVAL("test", "${cutscr:4,,test}");
+ WEE_CHECK_EVAL("test", "${cut:+4,,test}");
+ WEE_CHECK_EVAL("test", "${cutscr:+4,,test}");
+
+ WEE_CHECK_EVAL("test", "${cut:4,+,test}");
+ WEE_CHECK_EVAL("test", "${cutscr:4,+,test}");
+ WEE_CHECK_EVAL("test", "${cut:+4,+,test}");
+ WEE_CHECK_EVAL("test", "${cutscr:+4,+,test}");
+
WEE_CHECK_EVAL("éà", "${cut:2,,éàô}");
WEE_CHECK_EVAL("éà", "${cutscr:2,,éàô}");