Debian Codegraph @

tests/probes/textfilecontent54/test_probes_textfilecontent54.sh

raw symbols SCIP
1 #!/usr/bin/envscip-shell filesystem . . `/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_textfilecontent54scip-shell shell shell-project 0.0.0 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 [scip-shell system . . `[`. -f $RF ] && rmscip-shell system . . rm. -f $RF
26
27 local FILE_A="/tmp/test_probes_textfilecontent54.tmp_filescip-shell filesystem . . `/tmp/test_probes_textfilecontent54.tmp_file`."
28 local FILE_B="/tmp/test_probes_textfilecontent54.tmp_file_emptyscip-shell filesystem . . `/tmp/test_probes_textfilecontent54.tmp_file_empty`."
29 local FILE_C="/tmp/test_probes_textfilecontent54.tmp_file_non_existingscip-shell filesystem . . `/tmp/test_probes_textfilecontent54.tmp_file_non_existing`."
30
31 touchscip-shell system . . touch. "$FILE_A"
32 touchscip-shell system . . touch. "$FILE_B"
33
34 echoscip-shell system . . echo. "valid_key = valid_value" > "$FILE_A"
35 echoscip-shell system . . echo. "valid_key = valid_value" >> "$FILE_A"
36
37 $OSCAP oval eval --results $RF $DF
38
39 if [scip-shell system . . `[`. -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 rmscip-shell system . . rm. -f $FILE_A $FILE_B $FILE_C
47
48 return $ret_val
49 }
50
51 test_probes_textfilecontent54scip-shell shell shell-project 0.0.0 test_probes_textfilecontent54().