# Test that cf_null lists can be joined

# NOTE: tests conditions have been reversed! cf_null is no longer
#       treated specially!

body common control
{
      inputs => { "../../default.cf.sub" };
      bundlesequence  => { default("$(this.promise_filename)") };
      version => "1.0";
}

bundle agent init
{
  vars:
      "dummy" string => "";
}

bundle agent test
{
  vars:
      "dummy" string => "";
}

bundle agent check
{
  vars:
      "emptylist" slist => { "cf_null" };
      "joined" string => join(":", "emptylist");

  classes:
      "ok1" expression => strcmp($(joined), "");

      "ok" not => "ok1";    # the list should contain cf_null

  reports:
    ok::
      "$(this.promise_filename) Pass";
    !ok::
      "$(this.promise_filename) FAIL";
    DEBUG::
      "Expected cf_null string, got $(joined)!";
}
