Skip to content

Commit

Permalink
Acceptance test for join() on cf_null list
Browse files Browse the repository at this point in the history
  • Loading branch information
tzz authored and dottedmag committed Sep 25, 2012
1 parent 2433cb5 commit f52b768
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions tests/acceptance/01_vars/03_lists/007.cf
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Test that cf_null lists can be joined

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

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" and => { "ok1" };

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

0 comments on commit f52b768

Please sign in to comment.