Debian Codegraph @

tests/API/OVAL/unittests/test_oval_empty_variable_evaluation.xml

raw symbols SCIP
1 <?xml version="1.0"?>
2 <oval_definitions xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ind-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent" xmlns:unix-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix" xmlns:lin-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5" xsi:schemaLocation="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix unix-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#independent independent-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#linux linux-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">
3 <generator>
4 <oval:schema_version>5.10.1</oval:schema_version>
5 <oval:timestamp>0001-01-01T00:00:00+00:00</oval:timestamp>
6 </generator>
7
8 <definitions>
9 <definition class="compliance" version="1" id="oval:x:def:1">
10 <metadata>
11 <title>x</title>
12 <description>x</description>
13 <affected family="unix">
14 <platform>x</platform>
15 </affected>
16 </metadata>
17 <criteria comment="dummy definition">
18 <criterion test_ref="oval:x:tst:1"/>
19 <criterion test_ref="oval:x:tst:2"/>
20 <criterion test_ref="oval:x:tst:3"/>
21 <criterion test_ref="oval:x:tst:4"/>
22 </criteria>
23 </definition>
24 </definitions>
25
26 <tests>
27 <textfilecontent54_test id="oval:x:tst:1" check="all" comment="Object referencing an empty variable. Expected result: false." version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
28 <object object_ref="oval:x:obj:1"/>
29 </textfilecontent54_test>
30
31 <textfilecontent54_test id="oval:x:tst:2" check="all" comment="Object referencing a valid variable (for comparison). Expected result: true." version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
32 <object object_ref="oval:x:obj:2"/>
33 </textfilecontent54_test>
34
35 <textfilecontent54_test id="oval:x:tst:3" check="all" comment="State referencing an empty variable. Expected result: error." version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
36 <object object_ref="oval:x:obj:2"/>
37 <state state_ref="oval:x:ste:3"/>
38 </textfilecontent54_test>
39
40 <textfilecontent54_test id="oval:x:tst:4" check="all" comment="State referencing a valid variable (for comparison). Expected result: true." version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
41 <object object_ref="oval:x:obj:2"/>
42 <state state_ref="oval:x:ste:4"/>
43 </textfilecontent54_test>
44 </tests>
45
46 <objects>
47 <textfilecontent54_object id="oval:x:obj:1" version="1" comment="Object referencing an empty variable. Expected flag: does not exist." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
48 <filepath datatype="string" operation="equals" var_check="at least one" var_ref="oval:x:var:11"/>
49 <pattern datatype="string" operation="pattern match">.*</pattern>
50 <instance datatype="int" operation="equals">1</instance>
51 </textfilecontent54_object>
52
53 <textfilecontent54_object id="oval:x:obj:11" version="1" comment="Nonexistent object. Expected flag: does not exist." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
54 <filepath datatype="string" operation="equals">/nonexistent</filepath>
55 <pattern datatype="string" operation="pattern match">.*</pattern>
56 <instance datatype="int" operation="equals">1</instance>
57 </textfilecontent54_object>
58
59 <textfilecontent54_object id="oval:x:obj:2" version="1" comment="Object referencing a valid variable. Expected flag: complete." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
60 <filepath datatype="string" operation="equals" var_check="at least one" var_ref="oval:x:var:21"/>
61 <pattern datatype="string" operation="pattern match">.*</pattern>
62 <instance datatype="int" operation="equals">1</instance>
63 </textfilecontent54_object>
64
65 <textfilecontent54_object id="oval:x:obj:21" version="1" comment="Valid object. Expected flag: complete." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
66 <filepath datatype="string" operation="equals">/etc/issue</filepath>
67 <pattern datatype="string" operation="pattern match">.*</pattern>
68 <instance datatype="int" operation="equals">1</instance>
69 </textfilecontent54_object>
70 </objects>
71
72 <states>
73 <textfilecontent54_state version="1" id="oval:x:ste:3" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
74 <filepath datatype="string" operation="equals" var_check="at least one" var_ref="oval:x:var:11"/>
75 </textfilecontent54_state>
76
77 <textfilecontent54_state version="1" id="oval:x:ste:4" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
78 <filepath datatype="string" operation="equals" var_check="at least one" var_ref="oval:x:var:21"/>
79 </textfilecontent54_state>
80 </states>
81
82 <variables>
83 <local_variable id="oval:x:var:11" version="1" datatype="string" comment="Variable referencing a nonexistent object.">
84 <object_component object_ref="oval:x:obj:11" item_field="filepath"/>
85 </local_variable>
86
87 <local_variable id="oval:x:var:21" version="1" datatype="string" comment="Variable referencing an existing object.">
88 <object_component object_ref="oval:x:obj:21" item_field="filepath"/>
89 </local_variable>
90 </variables>
91 </oval_definitions>