From e21a39fa62b4b3f75d11a8301c7b7976812e4c4e Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Tue, 1 Jul 2025 16:43:18 +0200 Subject: [PATCH] Filter: Add more tests for append operator --- filter/test.conf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/filter/test.conf b/filter/test.conf index 0540b111a..09d727c15 100644 --- a/filter/test.conf +++ b/filter/test.conf @@ -258,6 +258,10 @@ function t_string() bt_assert("abcd".append(format(1234)) = "abcd1234"); bt_assert(append("He", "llo") = st); bt_assert("Hello" ++ " " ++ "world" = "Hello world"); + + bt_assert(st = "Hello"); + st.append(" world"); + bt_assert(st = "Hello world"); } bt_test_suite(t_string, "Testing strings"); @@ -293,6 +297,10 @@ function t_bytestring() bt_assert(append(hex:01122334, hex:6778899a) = hex:011223346778899a); bt_assert(hex:01:12:23:34:45:56 ++ hex:67:78:89:9a:ab ++ hex:bc:cd:de:ef:f0 = bs2); + bs1 = hex:24:59:22:12; + bt_assert(bs1 = hex:24:59:22:12); + bs1.append(hex:01:23:45:67); + bt_assert(bs1 = hex:24:59:22:12:01:23:45:67); } bt_test_suite(t_bytestring, "Testing bytestrings"); -- 2.39.5