Debian Codegraph @

tests/probes/textfilecontent54/test_probes_textfilecontent54.sh

raw symbols SCIP
1 #!/usr/bin/env bash
2
3 # Copyright 2009 Red Hat Inc., Durham, North Carolina.
4 # All Rights Reserved.
5 #
6 # OpenScap Probes Test Suite.
7 #
8 # Created on: Nov 30, 2009
9 #
10 # Authors:
11 # Peter Vrabec, <[email protected]>
12 # David Niemoller
13 # Ondrej Moris, <[email protected]>
14
15 . $builddir/tests/test_common.sh
16
17 function test_probes_textfilecontent54 {
18
19 probecheck "textfilecontent54" || return 255
20
21 local ret_val=0;
22 local DF="${srcdir}/test_probes_textfilecontent54.xml"
23 local RF="results.xml"
24
25 [ -f $RF ] && rm -f $RF
26
27 local FILE_A="/tmp/test_probes_textfilecontent54.tmp_file"
28 local FILE_B="/tmp/test_probes_textfilecontent54.tmp_file_empty"
29 local FILE_C="/tmp/test_probes_textfilecontent54.tmp_file_non_existing"
30
31 touch "$FILE_A"
32 touch "$FILE_B"
33
34 echo "valid_key = valid_value" > "$FILE_A"
35 echo "valid_key = valid_value" >> "$FILE_A"
36
37 $OSCAP oval eval --results $RF $DF
38
39 if [ -f $RF ]; then
40 verify_results "def" $DF $RF 13 && verify_results "tst" $DF $RF 16
41 ret_val=$?
42 else
43 ret_val=1
44 fi
45
46 rm -f $FILE_A $FILE_B $FILE_C
47
48 return $ret_val
49 }
50
51 test_probes_textfilecontent54