Test::XML::Order - Compare the order of XML tags in perl tests


Test-XML-Order documentation  | view source Contained in the Test-XML-Order distribution.

Index


NAME

Top

Test::XML::Order - Compare the order of XML tags in perl tests

VERSION

Top

Version 1.01

SYNOPSIS

Top

  use Test::XML::Order tests => 3;
  is_xml_in_order( '<foo /><foo />', '<foo></foo><foo x="a"/>' );   # PASS
  is_xml_in_order( '<foo /><bar />', '<bar /><foo />' );       # FAIL
  isnt_xml_in_order( '<foo /><bar />', '<bar /><foo />' );     # PASS

DESCRIPTION

Top

This module contains generic XML testing tools. See below for a list of other modules with functions relating to specific XML modules.

FUNCTIONS

Top

is_xml_in_order ( GOT, EXPECTED [, TESTNAME ] )

This function compares GOT and EXPECTED, both of which are strings of XML. The comparison works only on the order of the tags, attributes are ignored.

Returns true or false, depending upon test success.

isnt_xml_in_order( GOT, MUST_NOT_BE [, TESTNAME ] )

This function is similar to is_xml_in_order(), except that it will fail if GOT and MUST_NOT_BE have elements in the same order.

NOTES

Top

Please note the following about Test::XML::Order.

SEE ALSO

Top

Test::More, Test::XML.

AUTHOR

Top

G. Allen Morris III, <gam3 (at) gam3.net>

COPYRIGHT AND LICENSE

Top


Test-XML-Order documentation  | view source Contained in the Test-XML-Order distribution.