| 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <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"> |
| 3 | <generator> |
| 4 | <oval:schema_version>5.10.1</oval:schema_version> |
| 5 | <oval:timestamp>2009-06-11T10:22:26-04:00</oval:timestamp> |
| 6 | <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> |
| 7 | </generator> |
| 8 | <definitions> |
| 9 | <definition id="oval:org.mitre.oval.test:def:29" version="2" class="miscellaneous"> |
| 10 | <metadata> |
| 11 | <title>Evaluate to true if the split function is properly supported</title> |
| 12 | <description>This definition is intended to evaluate to true if the interpreter properly supports the split function.</description> |
| 13 | </metadata> |
| 14 | <criteria operator="AND"> |
| 15 | <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"/> |
| 16 | <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"/> |
| 17 | <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"/> |
| 18 | <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"/> |
| 19 | <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"/> |
| 20 | </criteria> |
| 21 | </definition> |
| 22 | </definitions> |
| 23 | <tests> |
| 24 | <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"> |
| 25 | <object object_ref="oval:org.mitre.oval.test:obj:534"/> |
| 26 | <state state_ref="oval:org.mitre.oval.test:ste:118"/> |
| 27 | </variable_test> |
| 28 | <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"> |
| 29 | <object object_ref="oval:org.mitre.oval.test:obj:136"/> |
| 30 | <state state_ref="oval:org.mitre.oval.test:ste:547"/> |
| 31 | </variable_test> |
| 32 | <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"> |
| 33 | <object object_ref="oval:org.mitre.oval.test:obj:627"/> |
| 34 | <state state_ref="oval:org.mitre.oval.test:ste:278"/> |
| 35 | </variable_test> |
| 36 | <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"> |
| 37 | <object object_ref="oval:org.mitre.oval.test:obj:859"/> |
| 38 | <state state_ref="oval:org.mitre.oval.test:ste:251"/> |
| 39 | </variable_test> |
| 40 | <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"> |
| 41 | <object object_ref="oval:org.mitre.oval.test:obj:205"/> |
| 42 | <state state_ref="oval:org.mitre.oval.test:ste:959"/> |
| 43 | </variable_test> |
| 44 | </tests> |
| 45 | <objects> |
| 46 | <variable_object id="oval:org.mitre.oval.test:obj:534" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent"> |
| 47 | <var_ref>oval:org.mitre.oval.test:var:200</var_ref> |
| 48 | </variable_object> |
| 49 | <variable_object id="oval:org.mitre.oval.test:obj:136" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent"> |
| 50 | <var_ref>oval:org.mitre.oval.test:var:966</var_ref> |
| 51 | </variable_object> |
| 52 | <variable_object id="oval:org.mitre.oval.test:obj:627" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent"> |
| 53 | <var_ref>oval:org.mitre.oval.test:var:502</var_ref> |
| 54 | </variable_object> |
| 55 | <variable_object id="oval:org.mitre.oval.test:obj:859" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent"> |
| 56 | <var_ref>oval:org.mitre.oval.test:var:83</var_ref> |
| 57 | </variable_object> |
| 58 | <variable_object id="oval:org.mitre.oval.test:obj:205" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent"> |
| 59 | <var_ref>oval:org.mitre.oval.test:var:239</var_ref> |
| 60 | </variable_object> |
| 61 | </objects> |
| 62 | <states> |
| 63 | <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"> |
| 64 | <value>a</value> |
| 65 | </variable_state> |
| 66 | <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"> |
| 67 | <value/> |
| 68 | </variable_state> |
| 69 | <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"> |
| 70 | <value var_ref="oval:org.mitre.oval.test:var:983" var_check="at least one"/> |
| 71 | </variable_state> |
| 72 | <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"> |
| 73 | <value>foobar</value> |
| 74 | </variable_state> |
| 75 | <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"> |
| 76 | <value var_ref="oval:org.mitre.oval.test:var:948" var_check="at least one"/> |
| 77 | </variable_state> |
| 78 | </states> |
| 79 | <variables> |
| 80 | <local_variable id="oval:org.mitre.oval.test:var:200" version="1" comment="a-a-a => 'a','a','a'" datatype="string"> |
| 81 | <split delimiter="-"> |
| 82 | <literal_component>a-a-a</literal_component> |
| 83 | </split> |
| 84 | </local_variable> |
| 85 | <local_variable id="oval:org.mitre.oval.test:var:966" version="1" comment="hihihi => '','','',''" datatype="string"> |
| 86 | <split delimiter="hi"> |
| 87 | <literal_component>hihihi</literal_component> |
| 88 | </split> |
| 89 | </local_variable> |
| 90 | <local_variable id="oval:org.mitre.oval.test:var:502" version="1" comment="a-a-a => '','-','-',''" datatype="string"> |
| 91 | <split delimiter="a"> |
| 92 | <literal_component>a-a-a</literal_component> |
| 93 | </split> |
| 94 | </local_variable> |
| 95 | <local_variable id="oval:org.mitre.oval.test:var:83" version="1" comment="foobar => foobar" datatype="string"> |
| 96 | <split delimiter="noexist"> |
| 97 | <literal_component>foobar</literal_component> |
| 98 | </split> |
| 99 | </local_variable> |
| 100 | <local_variable id="oval:org.mitre.oval.test:var:239" version="1" comment="split function on multiple values" datatype="string"> |
| 101 | <split delimiter="-"> |
| 102 | <variable_component var_ref="oval:org.mitre.oval.test:var:411"/> |
| 103 | </split> |
| 104 | </local_variable> |
| 105 | <constant_variable id="oval:org.mitre.oval.test:var:411" version="1" comment="multi-value variable" datatype="string"> |
| 106 | <value>a-a-a</value> |
| 107 | <value>b-b-b</value> |
| 108 | <value>c-c-c</value> |
| 109 | </constant_variable> |
| 110 | <constant_variable id="oval:org.mitre.oval.test:var:948" version="1" comment="multi-valued variable" datatype="string"> |
| 111 | <value>a</value> |
| 112 | <value>b</value> |
| 113 | <value>c</value> |
| 114 | </constant_variable> |
| 115 | <constant_variable id="oval:org.mitre.oval.test:var:983" version="1" comment="match empty string and '-'" datatype="string"> |
| 116 | <value/> |
| 117 | <value>-</value> |
| 118 | </constant_variable> |
| 119 | </variables> |
| 120 | </oval_definitions> |