Debian Codegraph @

tests/API/OVAL/validate/all.sh

raw symbols SCIP
1 #!/usr/bin/envscip-shell filesystem . . `/usr/bin/env`. bash
2
3 . $builddir/tests/test_common.sh
4
5 function good-okscip-shell shell shell-project 0.0.0 good-ok(). {
6 $OSCAP oval validate ${srcdir}/oval-ok.xml
7 ret=$?
8 if [scip-shell system . . `[`. $ret -eq 0 ]; then
9 return 0
10 fi
11 return 1
12 }
13
14 function oval-no-xmlscip-shell shell shell-project 0.0.0 oval-no-xml(). {
15 $OSCAP oval validate ${srcdir}/all.sh
16 ret=$?
17 if [scip-shell system . . `[`. $ret -eq 1 ]; then
18 return 0
19 fi
20 return 1
21 }
22
23 function oval-schema-failscip-shell shell shell-project 0.0.0 oval-schema-fail(). {
24 $OSCAP oval validate ${srcdir}/oval-schema-fail.xml
25 ret=$?
26 if [scip-shell system . . `[`. $ret -eq 2 ]; then
27 return 0
28 fi
29 return 1
30 }
31
32 function oval-schematron-failscip-shell shell shell-project 0.0.0 oval-schematron-fail(). {
33 $OSCAP oval validate ${srcdir}/oval-schematron-fail.xml
34 ret=$?
35 if [scip-shell system . . `[`. $ret -eq 2 ]; then
36 return 0
37 fi
38 return 1
39 }
40
41 test_init test_validation.log
42 test_run "oval-ok" good-ok
43 test_run "oval-no-xml" oval-no-xml
44 test_run "oval-schema-fail" oval-schema-fail
45 test_run "oval-schematron-fail" oval-schematron-fail
46 test_exit
47