Debian Codegraph @

tests/API/OVAL/unittests/test_external_variable.oval.xml

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8"?>
2 <oval_definitions xsi:schemaLocation="http://oval.mitre.org/XMLSchema/oval-definitions-5 oval-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#independent independent-definitions-schema.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:ind-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent" xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5">
3 <generator>
4 <oval:schema_version>5.11</oval:schema_version>
5 <oval:timestamp>2009-05-21T11:46:00-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:x:def:562" version="1" class="miscellaneous">
10 <metadata>
11 <title>Evaluate to true if the oval-def:external_variable construct is properly supported</title>
12 <description>This definition is intended to evalutate to true if the interpreter properly supports the oval-def:external_variable construct.</description>
13 </metadata>
14 <criteria operator="AND">
15 <criterion comment="Test that the external_variable construct is supported for a single possible_restriction." test_ref="oval:x:tst:1"/>
16 <criterion comment="Test that the external_variable construct is supported for multiple possible_restrictions." test_ref="oval:x:tst:2"/>
17 <criterion comment="Test that the external_variable construct is supported for a single possible_value." test_ref="oval:x:tst:3"/>
18 <criterion comment="Test that the external_variable construct is supported for multiple possible_values." test_ref="oval:x:tst:4"/>
19 <criterion comment="Test that the external_variable construct is supported for a single possible_restriction." test_ref="oval:x:tst:5"/>
20 <criterion comment="Test that the external_variable construct is supported for a single possible_restriction." test_ref="oval:x:tst:6"/>
21 <criterion comment="Test that the external_variable construct is supported for a single possible_restriction." test_ref="oval:x:tst:7"/>
22 <criterion comment="Test that the external_variable construct is supported for a single possible_restriction." test_ref="oval:x:tst:8"/>
23 <criterion comment="Test that the external_variable construct is supported for a single possible_restriction." test_ref="oval:x:tst:9"/>
24 <criterion comment="Test that the external_variable construct is supported for a single possible_restriction." test_ref="oval:x:tst:10"/>
25 </criteria>
26 </definition>
27 </definitions>
28 <tests>
29 <variable_test id="oval:x:tst:1" version="1" comment="Test that the external_variable construct is supported for a single possible_restriction." check_existence="at_least_one_exists" check="all" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
30 <object object_ref="oval:x:obj:1"/>
31 </variable_test>
32 <variable_test id="oval:x:tst:2" version="1" comment="Test that the external_variable construct is supported for multiple possible_restrictions." check_existence="at_least_one_exists" check="all" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
33 <object object_ref="oval:x:obj:2"/>
34 </variable_test>
35 <variable_test id="oval:x:tst:3" version="1" comment="Test that the external_variable construct is supported for a single possible_value." check_existence="at_least_one_exists" check="all" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
36 <object object_ref="oval:x:obj:3"/>
37 </variable_test>
38 <variable_test id="oval:x:tst:4" version="1" comment="Test that the external_variable construct is supported for multiple possible_values." check_existence="at_least_one_exists" check="all" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
39 <object object_ref="oval:x:obj:4"/>
40 </variable_test>
41 <variable_test id="oval:x:tst:5" version="1" comment="Test that the external_variable construct is supported for a single possible_restriction." check_existence="at_least_one_exists" check="all" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
42 <object object_ref="oval:x:obj:5"/>
43 </variable_test>
44 <variable_test id="oval:x:tst:6" version="1" comment="Test that the external_variable construct is supported for a single possible_restriction." check_existence="at_least_one_exists" check="all" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
45 <object object_ref="oval:x:obj:6"/>
46 </variable_test>
47 <variable_test id="oval:x:tst:7" version="1" comment="Test that the external_variable construct is supported for a single possible_restriction." check_existence="at_least_one_exists" check="all" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
48 <object object_ref="oval:x:obj:7"/>
49 </variable_test>
50 <variable_test id="oval:x:tst:8" version="1" comment="Test that the external_variable construct is supported for a single possible_restriction." check_existence="at_least_one_exists" check="all" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
51 <object object_ref="oval:x:obj:8"/>
52 </variable_test>
53 <variable_test id="oval:x:tst:9" version="1" comment="Test that the external_variable construct is supported for a single possible_restriction." check_existence="at_least_one_exists" check="all" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
54 <object object_ref="oval:x:obj:9"/>
55 </variable_test>
56 <variable_test id="oval:x:tst:10" version="1" comment="Test that the external_variable construct is supported for a single possible_restriction." check_existence="at_least_one_exists" check="all" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
57 <object object_ref="oval:x:obj:10"/>
58 </variable_test>
59 </tests>
60 <objects>
61 <variable_object id="oval:x:obj:1" version="1" comment="This variable_object references an external_variable that restricts the variable's values such that they must match the regular expression '^[0-9]{3}-[0-9]{3}-[0-9]{4}$'." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
62 <var_ref>oval:x:var:1</var_ref>
63 </variable_object>
64 <variable_object id="oval:x:obj:2" version="1" comment="This variable_object references an external_variable that restricts the variable's values such that they must match the regular expression '^[0-9]{3}-[0-9]{3}-[0-9]{4}$' or '^1-[0-9]{3}-[0-9]{3}-[0-9]{4}$'." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
65 <var_ref>oval:x:var:2</var_ref>
66 </variable_object>
67 <variable_object id="oval:x:obj:3" version="1" comment="This variable_object references an external_variable that restricts the variable's value to '0'." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
68 <var_ref>oval:x:var:3</var_ref>
69 </variable_object>
70 <variable_object id="oval:x:obj:4" version="1" comment="This variable_object references an external_variable that restricts the variable's value to '0' or '1'." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
71 <var_ref>oval:x:var:4</var_ref>
72 </variable_object>
73 <variable_object id="oval:x:obj:5" version="1" comment="This variable_object references an external_variable that restricts the variable's values such that they must be greater than 10 and less than 20" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
74 <var_ref>oval:x:var:5</var_ref>
75 </variable_object>
76 <variable_object id="oval:x:obj:6" version="1" comment="This variable_object references an external_variable that restricts the variable's values such that they must be greater than 10 and less than 20" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
77 <var_ref>oval:x:var:6</var_ref>
78 </variable_object>
79 <variable_object id="oval:x:obj:7" version="1" comment="This variable_object references an external_variable that restricts the variable's values such that they must be equal to 100 or equal to 200 or equal to 300" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
80 <var_ref>oval:x:var:7</var_ref>
81 </variable_object>
82 <variable_object id="oval:x:obj:8" version="1" comment="This variable_object references an external_variable that restricts the variable's values such that they must be equal to 100 or equal to 200 or equal to 300" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
83 <var_ref>oval:x:var:8</var_ref>
84 </variable_object>
85 <variable_object id="oval:x:obj:9" version="1" comment="This variable_object references an external_variable that restricts the variable's values such that they must not equal to 0" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
86 <var_ref>oval:x:var:9</var_ref>
87 </variable_object>
88 <variable_object id="oval:x:obj:10" version="1" comment="This variable_object references an external_variable that restricts the variable's values such that they must not equal to 0" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
89 <var_ref>oval:x:var:10</var_ref>
90 </variable_object>
91 </objects>
92
93 <variables>
94 <external_variable id="oval:x:var:1" version="1" comment="This external_variable references the string value '123-456-7890' from external-variables.xml and restricts the value such that it must match the regular expression '^[0-9]{3}-[0-9]{3}-[0-9]{4}$'." datatype="string">
95 <possible_restriction hint="hint">
96 <restriction operation="pattern match">^[0-9]{3}-[0-9]{3}-[0-9]{4}$</restriction>
97 </possible_restriction>
98 </external_variable>
99 <external_variable id="oval:x:var:2" version="1" comment="This external_variable references the string value '1-123-456-7890' from external-variables.xml and restricts the value such that it must match the regular expression '^[0-9]{3}-[0-9]{3}-[0-9]{4}$' or '^1-[0-9]{3}-[0-9]{3}-[0-9]{4}$'." datatype="string">
100 <possible_restriction hint="This restricts the variable value(s) to the 10 digit telephone number format xxx-xxx-xxxx">
101 <restriction operation="pattern match">^[0-9]{3}-[0-9]{3}-[0-9]{4}$</restriction>
102 </possible_restriction>
103 <possible_restriction hint="This restricts the variable value(s) to the 1 plus 10 digit telephone number format x-xxx-xxx-xxxx">
104 <restriction operation="pattern match">^1-[0-9]{3}-[0-9]{3}-[0-9]{4}$</restriction>
105 </possible_restriction>
106 </external_variable>
107 <external_variable id="oval:x:var:3" version="1" comment="This external_variable references the integer value '0' from external-variables.xml and restricts the value such that it must be equal to '0'." datatype="int">
108 <possible_value hint="This restricts the variable value(s) to 0.">0</possible_value>
109 </external_variable>
110 <external_variable id="oval:x:var:4" version="1" comment="This external_variable references the integer value '1' from external-variables.xml and restricts the value such that it must be equal to '0' or '1'." datatype="int">
111 <possible_value hint="This restricts the variable value(s) to 0.">0</possible_value>
112 <possible_value hint="This restricts the variable value(s) to 1.">1</possible_value>
113 </external_variable>
114 <external_variable id="oval:x:var:5" version="1" comment="This external_variable references the integer value '13' from external-variables.xml" datatype="int">
115 <possible_restriction hint="greater than 10 and less than 20">
116 <restriction operation="greater than">10</restriction>
117 <restriction operation="less than">20</restriction>
118 </possible_restriction>
119 </external_variable>
120 <external_variable id="oval:x:var:6" version="1" comment="This external_variable references the integer value '42' from external-variables.xml" datatype="int">
121 <possible_restriction operator="AND" hint="greater than 10 and less than 20">
122 <restriction operation="greater than">10</restriction>
123 <restriction operation="less than">20</restriction>
124 </possible_restriction>
125 </external_variable>
126 <external_variable id="oval:x:var:7" version="1" comment="This external_variable references the integer value '300' from external-variables.xml" datatype="int">
127 <possible_restriction operator="OR" hint="equal to 100 or equal to 200 or equal to 300">
128 <restriction operation="equals">100</restriction>
129 <restriction operation="equals">200</restriction>
130 <restriction operation="equals">300</restriction>
131 </possible_restriction>
132 </external_variable>
133 <external_variable id="oval:x:var:8" version="1" comment="This external_variable references the integer value '666' from external-variables.xml" datatype="int">
134 <possible_restriction operator="OR" hint="equal to 100 or equal to 200 or equal to 300">
135 <restriction operation="equals">100</restriction>
136 <restriction operation="equals">200</restriction>
137 <restriction operation="equals">300</restriction>
138 </possible_restriction>
139 </external_variable>
140 <external_variable id="oval:x:var:9" version="1" comment="This external_variable references the integer value '0' from external-variables.xml" datatype="int">
141 <possible_restriction operator="ONE" hint="everything except 0">
142 <restriction operation="greater than or equal">0</restriction>
143 <restriction operation="less than or equal">0</restriction>
144 </possible_restriction>
145 </external_variable>
146 <external_variable id="oval:x:var:10" version="1" comment="This external_variable references the integer value '17' from external-variables.xml" datatype="int">
147 <possible_restriction operator="ONE" hint="everything except 0">
148 <restriction operation="greater than or equal">0</restriction>
149 <restriction operation="less than or equal">0</restriction>
150 </possible_restriction>
151 </external_variable>
152 </variables>
153 </oval_definitions>