From 6d9a247df3f3066df7d3cee810543568f0d81a40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Mon, 27 Jan 2020 21:32:28 +0100 Subject: [PATCH] tests: add eval tests with invalid values for "repeat:" --- tests/unit/core/test-core-eval.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/unit/core/test-core-eval.cpp b/tests/unit/core/test-core-eval.cpp index d10fa8490..868574ff0 100644 --- a/tests/unit/core/test-core-eval.cpp +++ b/tests/unit/core/test-core-eval.cpp @@ -384,6 +384,11 @@ TEST(CoreEval, EvalExpression) WEE_CHECK_EVAL("Hello, \x19" "F03world!", "${revscr:${revscr:Hello, ${color:red}world!}}"); + /* test repeat of string (invalid values) */ + WEE_CHECK_EVAL("", "${repeat:}"); + WEE_CHECK_EVAL("", "${repeat:0}"); + WEE_CHECK_EVAL("", "${repeat:a,x}"); + /* test repeat of string */ WEE_CHECK_EVAL("", "${repeat:-1,x}"); WEE_CHECK_EVAL("", "${repeat:0,x}");