mirror of
https://github.com/inspec/inspec
synced 2025-02-17 06:28:40 +00:00
xml resource: update docs with alternate syntax for keys with periods (#2389)
Signed-off-by: Adam Leff <adam@leff.co>
This commit is contained in:
parent
68a934b03b
commit
470582a84e
2 changed files with 5 additions and 0 deletions
|
@ -38,6 +38,10 @@ where
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
In the event the path contains an element which contains periods, the alternate syntax can be used:
|
||||||
|
|
||||||
|
its(['root/name.with.a.period']) { should cmp 'so_many_dots' }
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
The following examples show how to use this InSpec audit resource.
|
The following examples show how to use this InSpec audit resource.
|
||||||
|
|
|
@ -8,6 +8,7 @@ module Inspec::Resources
|
||||||
example "
|
example "
|
||||||
describe xml('default.xml') do
|
describe xml('default.xml') do
|
||||||
its('key/sub_key') { should eq(['value']) }
|
its('key/sub_key') { should eq(['value']) }
|
||||||
|
its(['root/name.with.a.period']) { should cmp 'so_many_dots' }
|
||||||
end
|
end
|
||||||
"
|
"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue