From d4a43d4c23c21d97ec77cdb22fae8b4f7f96a932 Mon Sep 17 00:00:00 2001 From: Simon Halvorsen Date: Fri, 5 Jun 2026 11:43:15 +0200 Subject: [PATCH 1/2] renamed trailing_comma_arglist -> trailing_comma_paramlist Changelog: none Ticket: none Signed-off-by: Simon Halvorsen --- .../{trailing_comma_arglist.cf => trailing_comma_paramlist.cf} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tests/acceptance/00_basics/01_compiler/{trailing_comma_arglist.cf => trailing_comma_paramlist.cf} (100%) diff --git a/tests/acceptance/00_basics/01_compiler/trailing_comma_arglist.cf b/tests/acceptance/00_basics/01_compiler/trailing_comma_paramlist.cf similarity index 100% rename from tests/acceptance/00_basics/01_compiler/trailing_comma_arglist.cf rename to tests/acceptance/00_basics/01_compiler/trailing_comma_paramlist.cf From 56c6ae465e20ed5b6a9400678c18b7295bdc9496 Mon Sep 17 00:00:00 2001 From: Simon Halvorsen Date: Fri, 5 Jun 2026 11:44:38 +0200 Subject: [PATCH 2/2] test: Added test for trailing commas in calls Ticket: CFE-664 Changelog: none Signed-off-by: Simon Halvorsen --- .../01_compiler/trailing_comma_args.cf | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 tests/acceptance/00_basics/01_compiler/trailing_comma_args.cf diff --git a/tests/acceptance/00_basics/01_compiler/trailing_comma_args.cf b/tests/acceptance/00_basics/01_compiler/trailing_comma_args.cf new file mode 100644 index 0000000000..d0cbc19ffc --- /dev/null +++ b/tests/acceptance/00_basics/01_compiler/trailing_comma_args.cf @@ -0,0 +1,31 @@ +body common control +{ + bundlesequence => { "test" }; +} + +bundle agent test +{ + classes: + # Testing function call + "exists" expression => fileexists($(this.promise_filename)); + "exists_trailing" expression => fileexists($(this.promise_filename), ); + + methods: + # Testing bundle call + "check" usebundle => check("a", "b", "c"); + "check_trailing" usebundle => check("d", "e", "f", ); + + reports: + exists.exists_trailing.abc.def:: + "$(this.promise_filename) Pass: Both trailing and non-trailing functions/bundles match"; + + !(exists.exists_trailing.abc.def):: + "$(this.promise_filename) Fail: Class evaluation failing between trailing and non-trailing functions/bundles"; +} + +bundle agent check(a, b, c) +{ + classes: + "$(a)$(b)$(c)" + scope => "namespace"; +}