Debian Codegraph @

tests/probes/yamlfilecontent/test_probes_yamlfilecontent_content.sh

raw symbols SCIP
1 #!/usr/bin/env bash
2
3 . $builddir/tests/test_common.sh
4
5 set -e -o pipefail
6
7 probecheck "yamlfilecontent" || exit 255
8
9 oval_file="${srcdir}/test_probes_yamlfilecontent_content.xml"
10 result="results.xml"
11
12 [ -f $result ] && rm -f $result
13
14 $OSCAP oval eval --results $result $oval_file
15
16 [ -f $result ]
17
18 sd='/oval_results/results/system/oval_system_characteristics/system_data'
19
20 assert_exists 1 $sd'/ind-sys:yamlfilecontent_item/ind-sys:value/field[@name="foo" and text()="bar"]'
21 assert_exists 1 $sd'/ind-sys:yamlfilecontent_item/ind-sys:value/field[@name="#" and @datatype="boolean" and text()="true"]'
22 assert_exists 2 $sd'/ind-sys:yamlfilecontent_item/ind-sys:value/field[@name="#" and text()="<value>"]'
23
24 rm -f "$result"