Skip to content

Commit

Permalink
Item9364: add 1.0.x tests for numerical ordering for 2,10,11
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/branches/Release01x00@8265 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
SvenDowideit authored and SvenDowideit committed Jul 21, 2010
1 parent bb1ea71 commit f4f6dcf
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions UnitTestContrib/test/unit/Fn_SEARCH.pm
Expand Up @@ -1963,6 +1963,7 @@ somethig after
%META:FORM{name="TestyForm"}%
%META:FIELD{name="FieldA" attributes="H" title="B Field" value="1234"}%
%META:FIELD{name="FieldB" attributes="" title="Banother Field" value="098"}%
%META:FIELD{name="FieldC" attributes="" title="Banother Field" value="11"}%
%META:FIELD{name="Firstname" attributes="" title="Pre Name" value="Pedro"}%
%META:FIELD{name="Lastname" attributes="" title="Post Name" value="Peal"}%
%META:FIELD{name="form" attributes="" title="Blah" value="form good"}%
Expand All @@ -1982,6 +1983,7 @@ third line
%META:FORM{name="TestyForm"}%
%META:FIELD{name="FieldA" attributes="H" title="B Field" value="7"}%
%META:FIELD{name="FieldB" attributes="" title="Banother Field" value="8"}%
%META:FIELD{name="FieldC" attributes="" title="Banother Field" value="2"}%
%META:FIELD{name="Firstname" attributes="" title="Pre Name" value="John"}%
%META:FIELD{name="Lastname" attributes="" title="Post Name" value="Peel"}%
%META:FIELD{name="form" attributes="" title="Blah" value="form good"}%
Expand All @@ -2001,6 +2003,7 @@ third line
%META:FORM{name="TestyForm"}%
%META:FIELD{name="FieldA" attributes="H" title="B Field" value="2"}%
%META:FIELD{name="FieldB" attributes="" title="Banother Field" value="-0.12"}%
%META:FIELD{name="FieldC" attributes="" title="Banother Field" value="10"}%
%META:FIELD{name="Firstname" attributes="" title="Pre Name" value="Jason"}%
%META:FIELD{name="Lastname" attributes="" title="Post Name" value="Peel"}%
%META:FIELD{name="form" attributes="" title="Blah" value="form good"}%
Expand Down Expand Up @@ -2102,6 +2105,17 @@ sub verify_orderTopic {
->handleCommonTags( $search.'order="formfield(FieldB)" reverse="on" format="$topic ($formfield(FieldB))"}%', $this->{test_web}, $this->{test_topic} );
$this->assert_str_equals( "QueryTopic (098),QueryTopicTwo (8),QueryTopicThree (-0.12),Ok+Topic (),Ok-Topic (),OkTopic (),TestTopicSEARCH (),WebPreferences ()", $result );

#order=formfield(FieldC)
$result =
$this->{twiki}
->handleCommonTags( $search.'order="formfield(FieldC)" format="$topic ($formfield(FieldC))"}%', $this->{test_web}, $this->{test_topic} );
$this->assert_str_equals( "Ok+Topic (),Ok-Topic (),OkTopic (),TestTopicSEARCH (),WebPreferences (),QueryTopicTwo (2),QueryTopicThree (10),QueryTopic (11)", $result );

$result =
$this->{twiki}
->handleCommonTags( $search.'order="formfield(FieldC)" reverse="on" format="$topic ($formfield(FieldC))"}%', $this->{test_web}, $this->{test_topic} );
$this->assert_str_equals( "QueryTopic (11),QueryTopicThree (10),QueryTopicTwo (2),Ok+Topic (),Ok-Topic (),OkTopic (),TestTopicSEARCH (),WebPreferences ()", $result );

#order=formfield(Firstname)
$result =
$this->{twiki}
Expand Down

0 comments on commit f4f6dcf

Please sign in to comment.