Debian Codegraph @

tests/API/OVAL/schema_version/test_schema_version.sh

raw symbols SCIP
1 #!/usr/bin/envscip-shell filesystem . . `/usr/bin/env`. bash
2
3 # Copyright 2015 Red Hat Inc., Durham, North Carolina.
4 # All Rights Reserved.
5 #
6 # OpenScap Test Suite
7 #
8 # Authors:
9 # Jan Černý <[email protected]>
10
11 . $builddir/tests/test_common.sh
12
13 # Test cases.
14
15 set -e -o pipefail
16
17 TEST="./test_schema_version"
18
19 function test_comparing_schema_versionsscip-shell shell shell-project 0.0.0 test_comparing_schema_versions(). {
20 # format: version_1 version_2 result
21 $TEST 5.2 5.2 0
22 $TEST 4.2 5.2 -1
23 $TEST 6.2 4.2 1
24 $TEST 5.10 5.11 -1
25 $TEST 5.11 5.10 1
26 $TEST 6.0.1 6.0 1
27 $TEST 6.0.1 6.0.2 -1
28 $TEST 6.0.2 6.1.2 -1
29 $TEST 6.13.4 6.13 1
30 $TEST 999.999.999 999.999.998 1
31 $TEST 5.11.1:1.0 5.11.1:1.0 0
32 $TEST 5.11.1:1.1 5.11.1:1.2 -1
33 $TEST 5.11.1:2.1 5.11.1:1.2 1
34 $TEST 5.11.2:1.0 5.11.1:1.0 1
35 $TEST 5.11.2:1.1 5.12.1:1.1 -1
36 $TEST 6.3:8.7.9 6.3:8.7.10 -1
37 $TEST 13.0:1.2.3 13.0:1.3 -1
38 $TEST 13.0:1.2.3 13.0:1.2 1
39 $TEST 42.42.42:42.42.42 42.42.42:42.42.42 0
40 }
41
42 # Testing.
43
44 test_init
45
46 if [scip-shell system . . `[`. -z ${CUSTOM_OSCAP+x} ] ; then
47 test_run "test_comparing_schema_versions" test_comparing_schema_versions
48 fi
49
50 test_exit