tests: add eval tests with invalid values for "cut:" and "cutscr:"

v2.8-utf8proc
Sébastien Helleu 2020-01-27 21:28:59 +01:00
parent 34bb43379a
commit 1914ceb74f
1 changed files with 8 additions and 0 deletions

View File

@ -281,6 +281,14 @@ TEST(CoreEval, EvalExpression)
WEE_CHECK_EVAL("********", "${hide:*,password}");
WEE_CHECK_EVAL("\u2603\u2603\u2603", "${hide:${esc:\u2603},abc}");
/* test cut of chars (invalid values) */
WEE_CHECK_EVAL("", "${cut:}");
WEE_CHECK_EVAL("", "${cut:0,}");
WEE_CHECK_EVAL("", "${cut:a,,}");
WEE_CHECK_EVAL("", "${cutscr:}");
WEE_CHECK_EVAL("", "${cutscr:0,}");
WEE_CHECK_EVAL("", "${cutscr:a,,}");
/* test cut of chars */
WEE_CHECK_EVAL("", "${cut:0,,}");
WEE_CHECK_EVAL("", "${cutscr:0,,}");