Blob Blame History Raw
<?xml version="1.0" encoding="UTF-8"?>
<oval_definitions xsi:schemaLocation="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent independent-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5 oval-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-common-5 oval-common-schema.xsd" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5">
  <generator>
    <oval:schema_version>5.10.1</oval:schema_version>
    <oval:timestamp>2009-06-11T10:22:26-04:00</oval:timestamp>
    <terms_of_use>Copyright (c) 2002-2012, The MITRE Corporation. All rights reserved. The contents of this file are subject to the license described in terms.txt.</terms_of_use>
  </generator>
  <definitions>
    <definition id="oval:org.mitre.oval.test:def:29" version="2" class="miscellaneous">
      <metadata>
        <title>Evaluate to true if the split function is properly supported</title>
        <description>This definition is intended to evaluate to true if the interpreter properly supports the split function.</description>
      </metadata>
      <criteria operator="AND">
        <criterion comment="Test that the split function is supported with a single component that contains a single string value that contains multiple instances of the string value specified in the delimiter attribute." test_ref="oval:org.mitre.oval.test:tst:513"/>
        <criterion comment="Test that the split function is supported with a single component that contains a single string value that starts and ends with the string value specified in the delimiter attribute and returns a single valued result." test_ref="oval:org.mitre.oval.test:tst:217"/>
        <criterion comment="Test that the split function is supported with a single component that contains a single string value that starts and ends with the string value specified in the delimiter attribute and returns a multiple valued result." test_ref="oval:org.mitre.oval.test:tst:566"/>
        <criterion comment="Test that the split function is supported with a single component that contains a single string value that does not contain the string value specified in the delimiter attribute." test_ref="oval:org.mitre.oval.test:tst:479"/>
        <criterion comment="Test that the split function is supported with a single component that contains multiple string values." test_ref="oval:org.mitre.oval.test:tst:25"/>
      </criteria>
    </definition>
  </definitions>
  <tests>
    <variable_test id="oval:org.mitre.oval.test:tst:513" version="1" comment="Test that the split function is supported with a single component that contains a single string value that contains multiple instances of the string value specified in the delimiter attribute." check_existence="all_exist" check="all" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
      <object object_ref="oval:org.mitre.oval.test:obj:534"/>
      <state state_ref="oval:org.mitre.oval.test:ste:118"/>
    </variable_test>
    <variable_test id="oval:org.mitre.oval.test:tst:217" version="1" comment="Test that the split function is supported with a single component that contains a single string value that starts and ends with the string value specified in the delimiter attribute and returns a single valued result." check_existence="all_exist" check="all" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
      <object object_ref="oval:org.mitre.oval.test:obj:136"/>
      <state state_ref="oval:org.mitre.oval.test:ste:547"/>
    </variable_test>
    <variable_test id="oval:org.mitre.oval.test:tst:566" version="2" comment="Test that the split function is supported with a single component that contains a single string value that starts and ends with the string value specified in the delimiter attribute and returns a multiple valued result." check_existence="all_exist" check="all" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
      <object object_ref="oval:org.mitre.oval.test:obj:627"/>
      <state state_ref="oval:org.mitre.oval.test:ste:278"/>
    </variable_test>
    <variable_test id="oval:org.mitre.oval.test:tst:479" version="1" comment="Test that the split function is supported with a single component that contains a single string value that does not contain the string value specified in the delimiter attribute." check_existence="all_exist" check="all" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
      <object object_ref="oval:org.mitre.oval.test:obj:859"/>
      <state state_ref="oval:org.mitre.oval.test:ste:251"/>
    </variable_test>
    <variable_test id="oval:org.mitre.oval.test:tst:25" version="1" comment="Test that the split function is supported with a single component that contains multiple string values." check_existence="all_exist" check="all" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
      <object object_ref="oval:org.mitre.oval.test:obj:205"/>
      <state state_ref="oval:org.mitre.oval.test:ste:959"/>
    </variable_test>
  </tests>
  <objects>
    <variable_object id="oval:org.mitre.oval.test:obj:534" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
      <var_ref>oval:org.mitre.oval.test:var:200</var_ref>
    </variable_object>
    <variable_object id="oval:org.mitre.oval.test:obj:136" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
      <var_ref>oval:org.mitre.oval.test:var:966</var_ref>
    </variable_object>
    <variable_object id="oval:org.mitre.oval.test:obj:627" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
      <var_ref>oval:org.mitre.oval.test:var:502</var_ref>
    </variable_object>
    <variable_object id="oval:org.mitre.oval.test:obj:859" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
      <var_ref>oval:org.mitre.oval.test:var:83</var_ref>
    </variable_object>
    <variable_object id="oval:org.mitre.oval.test:obj:205" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
      <var_ref>oval:org.mitre.oval.test:var:239</var_ref>
    </variable_object>
  </objects>
  <states>
    <variable_state id="oval:org.mitre.oval.test:ste:118" version="1" comment="The state of all values being equal to 'a'." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
      <value>a</value>
    </variable_state>
    <variable_state id="oval:org.mitre.oval.test:ste:547" version="1" comment="The state of all values being equal to ''." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
      <value/>
    </variable_state>
    <variable_state id="oval:org.mitre.oval.test:ste:278" version="2" comment="The state where each value is either an empty string or a '-'." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
      <value var_ref="oval:org.mitre.oval.test:var:983" var_check="at least one"/>
    </variable_state>
    <variable_state id="oval:org.mitre.oval.test:ste:251" version="1" comment="The string 'foobar'." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
      <value>foobar</value>
    </variable_state>
    <variable_state id="oval:org.mitre.oval.test:ste:959" version="1" comment="A multi-valued variable." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
      <value var_ref="oval:org.mitre.oval.test:var:948" var_check="at least one"/>
    </variable_state>
  </states>
  <variables>
    <local_variable id="oval:org.mitre.oval.test:var:200" version="1" comment="a-a-a => 'a','a','a'" datatype="string">
      <split delimiter="-">
        <literal_component>a-a-a</literal_component>
      </split>
    </local_variable>
    <local_variable id="oval:org.mitre.oval.test:var:966" version="1" comment="hihihi => '','','',''" datatype="string">
      <split delimiter="hi">
        <literal_component>hihihi</literal_component>
      </split>
    </local_variable>
    <local_variable id="oval:org.mitre.oval.test:var:502" version="1" comment="a-a-a => '','-','-',''" datatype="string">
      <split delimiter="a">
        <literal_component>a-a-a</literal_component>
      </split>
    </local_variable>
    <local_variable id="oval:org.mitre.oval.test:var:83" version="1" comment="foobar => foobar" datatype="string">
      <split delimiter="noexist">
        <literal_component>foobar</literal_component>
      </split>
    </local_variable>
    <local_variable id="oval:org.mitre.oval.test:var:239" version="1" comment="split function on multiple values" datatype="string">
      <split delimiter="-">
        <variable_component var_ref="oval:org.mitre.oval.test:var:411"/>
      </split>
    </local_variable>
    <constant_variable id="oval:org.mitre.oval.test:var:411" version="1" comment="multi-value variable" datatype="string">
      <value>a-a-a</value>
      <value>b-b-b</value>
      <value>c-c-c</value>
    </constant_variable>
    <constant_variable id="oval:org.mitre.oval.test:var:948" version="1" comment="multi-valued variable" datatype="string">
      <value>a</value>
      <value>b</value>
      <value>c</value>
    </constant_variable>
    <constant_variable id="oval:org.mitre.oval.test:var:983" version="1" comment="match empty string and '-'" datatype="string">
      <value/>
      <value>-</value>
    </constant_variable>
  </variables>
</oval_definitions>