If you use separator together with header, an extra separator is added.

With header:
%SEARCH{
"name~'*Pattern*'"
type="query"
format="[[$web.$topic][$topic]]"
separator=", "
header="Search for Pattern:<br />"
nonoise="on"
}%
... creates:

Search for Pattern:
PatternSkin, PatternSkinBugsTemplate, PatternSkinItemViewTemplate

... while without header:
%SEARCH{
"name~'*Pattern*'"
type="query"
format="[[$web.$topic][$topic]]"
separator=", "
nonoise="on"
}%
... creates:

PatternSkin, PatternSkinBugsTemplate, PatternSkinItemViewTemplate

-- ArthurClemens - 03 Feb 2009

This seems to be coded on purpose:

        # header and footer of $web
        my ( $beforeText, $repeatText, $afterText ) =
          split( /%REPEAT%/, $tmplTable );
        if ( defined $header ) {
            $beforeText = Foswiki::expandStandardEscapes($header);
            $beforeText =~ s/\$web/$web/gos;    # expand name of web
            if ( defined($separator) ) {
                $beforeText .= $separator;
            }
            else {
                $beforeText =~
                  s/([^\n])$/$1\n/os;           # add new line at end if needed
            }
        }

But removing it does not break any of the 175 unit tests.

-- ArthurClemens - 03 Feb 2009

Are you sure? It broke 151 unit tests...

Re-opening it to fix it "properly".

In fact, I have no idea how to fix it properly, so just "fixing" it so it doesn't break any unit test, and thus had to "fix" the new unit test added by Arthur, for this particular problem.

Arthur, please check your test environment, on mine, it breaks a lot of tests, and on the build server too...

-- OlivierRaginel - 04 Feb 2009

It does not break tests now.

-- ArthurClemens - 04 Feb 2009

It broke Fn_SEARCH because "Ok-Topic" is lexically below "Ok+Topic" but the separator tests had them reversed.

-- CrawfordCurrie - 07 Feb 2009

Dash it - it's only lexically below if UseLocale? is on. Made the Fn_SEARCH tests control the setting of UseLocale? , so we can be sure we've got our shoes on the right feet before we step in it again.

-- CrawfordCurrie - 08 Feb 2009

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons LicenseGet Foswiki at sourceforge.net. Fast, secure and Free Open Source software downloads