summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2020-01-27 21:32:28 +0100
committerSébastien Helleu <flashcode@flashtux.org>2020-01-27 23:04:24 +0100
commit6d9a247df3f3066df7d3cee810543568f0d81a40 (patch)
treeb465fd0f834c786757009b9e3a2e51ca837704b9 /tests
parent1914ceb74ff2494a30638e70a4f3bbf0c237cde4 (diff)
downloadweechat-6d9a247df3f3066df7d3cee810543568f0d81a40.zip
tests: add eval tests with invalid values for "repeat:"
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/core/test-core-eval.cpp5
1 files changed, 5 insertions, 0 deletions
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}");