Welcome to mirror list, hosted at ThFree Co, Russian Federation.

item_preproc_xpath.yaml « preprocessor « zabbix_server « tests - github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bec529d3e454f24505d4770112ff0477c483ada6 (plain)
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
---
test case: 'empty input parameters'
in:
  xml: ''
  xpath: ''
out:
  result: ''
  return: 'FAIL'
---
test case: 'single start tag'
in:
  xml: '<a>'
  xpath: ''
out:
  result: ''
  return: 'FAIL'
---
test case: 'single end tag'
in:
  xml: '<a/>'
  xpath: ''
out:
  result: ''
  return: 'FAIL'
---
test case: 'wrong operation format'
in:
  xml: '<a/>'
  xpath: '/a[\'
out:
  result: ''
  return: 'FAIL'
---
test case: 'wrong operation expression'
in:
  xml: '<a/>'
  xpath: '1 div 0'
out:
  result: ''
  return: 'FAIL'
---
test case: 'wrong operation format 2'
in:
  xml: '<a/>'
  xpath: '-a'
out:
  result: ''
  return: 'FAIL'
---
test case: 'empty output'
in:
  xml: '<a/>'
  xpath: '/b'
out:
  result: ''
  return: 'SUCCEED'
---
test case: 'successful expression'
in:
  xml: '<a/>'
  xpath: '3 div 2'
out:
  result: '1.5'
  return: 'SUCCEED'
---
test case: 'return end tag'
in:
  xml: '<a/>'
  xpath: '/a'
out:
  result: '<a/>'
  return: 'SUCCEED'
---
test case: 'return text'
in:
  xml: '<a>1</a>'
  xpath: '/a/text()'
out:
  result: '1'
  return: 'SUCCEED'
---
test case: 'return string'
in:
  xml: '<a>1</a>'
  xpath: 'string(/a)'
out:
  result: '1'
  return: 'SUCCEED'
---
test case: 'return attribute'
in:
  xml: '<a b="10">1</a>'
  xpath: 'string(/a/@b)'
out:
  result: '10'
  return: 'SUCCEED'
---
test case: 'return pattern'
in:
  xml: '<a><b x="1"/><c x="2"/><d x="1"/></a>'
  xpath: '//*[@x="1"]'
out:
  result: '<b x="1"/><d x="1"/>'
  return: 'SUCCEED'
...