File: oval-def_substring_function.xml

package info (click to toggle)
openscap 1.0.9-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 129,588 kB
  • ctags: 26,325
  • sloc: xml: 611,156; ansic: 90,367; sh: 26,693; makefile: 2,463; python: 804; perl: 445; cpp: 123
file content (116 lines) | stat: -rw-r--r-- 11,220 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<?xml version="1.0" encoding="UTF-8"?>
<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   http://oval.mitre.org/XMLSchema/oval-definitions-5#windows windows-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" xmlns:win-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#windows">
  <generator>
    <oval:schema_version>5.10.1</oval:schema_version>
    <oval:timestamp>2009-05-21T11:46:00-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:455" version="1" class="miscellaneous">
      <metadata>
        <title>Evaluate to true if the substring function is properly supported</title>
        <description>This definition is intended to evaluate to true if the interpreter properly supports the substring function.</description>
      </metadata>
      <criteria operator="AND">
        <criterion comment="Test that the substring function is supported with a single component that contains a single string value that specifies values for the substring_start and substring_length attributes such that the values are within range of the string's length." test_ref="oval:org.mitre.oval.test:tst:47"/>
        <criterion comment="Test that the substring function is supported with a single component that contains multiple string values that specify values for the substring_start and substring_length attributes such that the values are within range of the string's length." test_ref="oval:org.mitre.oval.test:tst:174"/>
        <criterion comment="Test that the substring function is supported with a single component that contains a single string value that specifies a value for the substring_start attribute that is less than 1 and a value for the substring_length attribute such that the value is within range of the string's length." test_ref="oval:org.mitre.oval.test:tst:606"/>
        <criterion comment="Test that the substring function is supported with a single component that contains a single string value that specifies a value for the substring_start attribute that is within the string's length and a value for the substring_length attribute such that the value is greater than the string's length." test_ref="oval:org.mitre.oval.test:tst:314"/>
        <criterion comment="Test that the substring function is supported with a single component that contains a single string value that specifies a value for the substring_start attribute that is within the string's length and a value for the substring_length attribute such that the value is less than 0." test_ref="oval:org.mitre.oval.test:tst:982"/>
      </criteria>
    </definition>
  </definitions>
  <tests>
    <variable_test id="oval:org.mitre.oval.test:tst:47" version="1" comment="Test that the substring function is supported with a single component that contains a single string value that specifies values for the substring_start and substring_length attributes such that the values are within range of the string's length." check_existence="at_least_one_exists" check="at least one" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
      <object object_ref="oval:org.mitre.oval.test:obj:721"/>
      <state state_ref="oval:org.mitre.oval.test:ste:690"/>
    </variable_test>
    <variable_test id="oval:org.mitre.oval.test:tst:174" version="1" comment="Test that the substring function is supported with a single component that contains multiple string values that specify values for the substring_start and substring_length attributes such that the values are within range of the string's length." check_existence="at_least_one_exists" check="at least one" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
      <object object_ref="oval:org.mitre.oval.test:obj:270"/>
      <state state_ref="oval:org.mitre.oval.test:ste:72"/>
    </variable_test>
    <variable_test id="oval:org.mitre.oval.test:tst:606" version="1" comment="Test that the substring function is supported with a single component that contains a single string value that specifies a value for the substring_start attribute that is less than 1 and a value for the substring_length attribute such that the value is within range of the string's length." check_existence="at_least_one_exists" check="at least one" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
      <object object_ref="oval:org.mitre.oval.test:obj:673"/>
      <state state_ref="oval:org.mitre.oval.test:ste:11"/>
    </variable_test>
    <variable_test id="oval:org.mitre.oval.test:tst:314" version="1" comment="Test that the substring function is supported with a single component that contains a single string value that specifies a value for the substring_start attribute that is within the string's length and a value for the substring_length attribute such that the value is greater than the string's length." check_existence="at_least_one_exists" check="at least one" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
      <object object_ref="oval:org.mitre.oval.test:obj:440"/>
      <state state_ref="oval:org.mitre.oval.test:ste:80"/>
    </variable_test>
    <variable_test id="oval:org.mitre.oval.test:tst:982" version="1" comment="Test that the substring function is supported with a single component that contains a single string value that specifies a value for the substring_start attribute that is within the string's length and a value for the substring_length attribute such that the value is less than 0." check_existence="at_least_one_exists" check="at least one" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
      <object object_ref="oval:org.mitre.oval.test:obj:113"/>
      <state state_ref="oval:org.mitre.oval.test:ste:353"/>
    </variable_test>
  </tests>
  <objects>
    <variable_object id="oval:org.mitre.oval.test:obj:721" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
      <var_ref>oval:org.mitre.oval.test:var:982</var_ref>
    </variable_object>
    <variable_object id="oval:org.mitre.oval.test:obj:270" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
      <var_ref>oval:org.mitre.oval.test:var:136</var_ref>
    </variable_object>
    <variable_object id="oval:org.mitre.oval.test:obj:673" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
      <var_ref>oval:org.mitre.oval.test:var:330</var_ref>
    </variable_object>
    <variable_object id="oval:org.mitre.oval.test:obj:440" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
      <var_ref>oval:org.mitre.oval.test:var:887</var_ref>
    </variable_object>
    <variable_object id="oval:org.mitre.oval.test:obj:113" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
      <var_ref>oval:org.mitre.oval.test:var:79</var_ref>
    </variable_object>
  </objects>
  <states>
    <variable_state id="oval:org.mitre.oval.test:ste:690" version="1" comment="The string 'cd'." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
      <value>cd</value>
    </variable_state>
    <variable_state id="oval:org.mitre.oval.test:ste:72" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
      <value var_ref="oval:org.mitre.oval.test:var:684" var_check="only one"/>
    </variable_state>
    <variable_state id="oval:org.mitre.oval.test:ste:11" version="1" comment="The string 'ab'." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
      <value>ab</value>
    </variable_state>
    <variable_state id="oval:org.mitre.oval.test:ste:80" version="1" comment="The string 'cdefg'." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
      <value>cdefg</value>
    </variable_state>
    <variable_state id="oval:org.mitre.oval.test:ste:353" version="1" comment="The string 'cdefg'." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent">
      <value>cdefg</value>
    </variable_state>
  </states>
  <variables>
    <local_variable id="oval:org.mitre.oval.test:var:982" version="1" comment="Applying the substring function to the string 'abcdefg' with substring_start value 3 and substring_length value 2." datatype="string">
      <substring substring_start="3" substring_length="2">
        <literal_component datatype="string">abcdefg</literal_component>
      </substring>
    </local_variable>
    <local_variable id="oval:org.mitre.oval.test:var:136" version="1" comment="Applying the substring function to a multi-value string with substring_start value 3 and substring_length value 2." datatype="string">
      <substring substring_start="3" substring_length="2">
        <variable_component var_ref="oval:org.mitre.oval.test:var:389"/>
      </substring>
    </local_variable>
    <local_variable id="oval:org.mitre.oval.test:var:330" version="1" comment="Applying the substring function to the string 'abcdefg' with substring_start value -1 and substring_length value 2." datatype="string">
      <substring substring_start="-1" substring_length="2">
        <literal_component datatype="string">abcdefg</literal_component>
      </substring>
    </local_variable>
    <local_variable id="oval:org.mitre.oval.test:var:887" version="1" comment="Applying the substring function to the string 'abcdefg' with substring_start value 1 and substring_length value 10." datatype="string">
      <substring substring_start="3" substring_length="10">
        <literal_component datatype="string">abcdefg</literal_component>
      </substring>
    </local_variable>
    <local_variable id="oval:org.mitre.oval.test:var:79" version="1" comment="Applying the substring function to the string 'abcdefg' with substring_start value 1 and substring_length value -1." datatype="string">
      <substring substring_start="3" substring_length="-1">
        <literal_component datatype="string">abcdefg</literal_component>
      </substring>
    </local_variable>
    <constant_variable id="oval:org.mitre.oval.test:var:389" version="1" comment="multi" datatype="string">
      <value>abcdefg</value>
      <value>hijklmn</value>
      <value>opqrstu</value>
    </constant_variable>
    <constant_variable id="oval:org.mitre.oval.test:var:684" version="1" comment="multi" datatype="string">
      <value>cd</value>
      <value>jk</value>
      <value>qr</value>
    </constant_variable>
  </variables>
</oval_definitions>