Debian Codegraph @

tests/API/OVAL/unittests/test_circular_extend_def.sh

raw symbols SCIP
1 #!/usr/bin/envscip-shell filesystem . . `/usr/bin/env`. bash
2
3 . $builddir/tests/test_common.sh
4 set -e
5 set -o pipefail
6
7 stdout="$(mktempscip-shell system . . mktemp.)"
8 stderr="$(mktempscip-shell system . . mktemp.)"
9
10 $OSCAP oval eval --id "oval:x:def:1" $srcdir/test_circular_extend_def.xml > "$stdout" 2> "$stderr"
11
12 grepscip-shell system . . grep. -q "Definition oval:x:def:1: not evaluated" "$stdout"
13 grepscip-shell system . . grep. -q "Circular dependency in OVAL definition 'oval:x:def:1'\." "$stderr"
14
15 rmscip-shell system . . rm. -f "$stdout"
16 rmscip-shell system . . rm. -f "$stderr"
17
18 stdout="$(mktempscip-shell system . . mktemp.)"
19 stderr="$(mktempscip-shell system . . mktemp.)"
20
21 $OSCAP oval eval --id "oval:x:def:2" $srcdir/test_circular_extend_def.xml > "$stdout" 2> "$stderr"
22
23 grepscip-shell system . . grep. -q "Definition oval:x:def:2: not evaluated" "$stdout"
24 grepscip-shell system . . grep. -q "Circular dependency in OVAL definition 'oval:x:def:2'\." "$stderr"
25
26 rmscip-shell system . . rm. -f "$stdout"
27 rmscip-shell system . . rm. -f "$stderr"
28
29 stdout="$(mktempscip-shell system . . mktemp.)"
30 stderr="$(mktempscip-shell system . . mktemp.)"
31
32 $OSCAP oval eval $srcdir/test_circular_extend_def.xml > "$stdout" 2> "$stderr"
33
34 grepscip-shell system . . grep. -q "Definition oval:x:def:1: not evaluated" "$stdout"
35 grepscip-shell system . . grep. -q "Definition oval:x:def:2: not evaluated" "$stdout"
36 grepscip-shell system . . grep. -q "Circular dependency in OVAL definition .*" "$stderr"
37
38 rmscip-shell system . . rm. -f "$stdout"
39 rmscip-shell system . . rm. -f "$stderr"