diff options
Diffstat (limited to 'tests/unit/core')
-rw-r--r-- | tests/unit/core/test-eval.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/unit/core/test-eval.cpp b/tests/unit/core/test-eval.cpp index e2ecd401a..92914f8d4 100644 --- a/tests/unit/core/test-eval.cpp +++ b/tests/unit/core/test-eval.cpp @@ -218,6 +218,16 @@ TEST(Eval, EvalExpression) WEE_CHECK_EVAL("********", "${hide:*,password}"); WEE_CHECK_EVAL("\u2603\u2603\u2603", "${hide:${esc:\u2603},abc}"); + /* test cut of chars */ + WEE_CHECK_EVAL("", "${cut:0,,}"); + WEE_CHECK_EVAL("", "${cut:0,+,}"); + WEE_CHECK_EVAL("", "${cut:0,,test}"); + WEE_CHECK_EVAL("+", "${cut:0,+,test}"); + WEE_CHECK_EVAL("te", "${cut:2,,test}"); + WEE_CHECK_EVAL("te+", "${cut:2,+,test}"); + WEE_CHECK_EVAL("éà", "${cut:2,,éàô}"); + WEE_CHECK_EVAL("éà+", "${cut:2,+,éàô}"); + /* test color */ WEE_CHECK_EVAL(gui_color_get_custom ("green"), "${color:green}"); WEE_CHECK_EVAL(gui_color_get_custom ("*214"), "${color:*214}"); |