| 1 | #!/usr/bin/env bash |
| 2 | . $builddir/tests/test_common.sh |
| 3 | |
| 4 | set -e |
| 5 | set -o pipefail |
| 6 | |
| 7 | . $builddir/tests/test_common.sh |
| 8 | |
| 9 | function perform_test { |
| 10 | # if xsltproc is not installed we will skip the test |
| 11 | require xsltproc || return 255 |
| 12 | |
| 13 | name=$(basename $0 .sh) |
| 14 | result=$(mktemp -t ${name}.xccdf12.XXXXXX) |
| 15 | |
| 16 | xsltproc --stringparam reverse_DNS com.example.www $srcdir/../../../../xsl/xccdf_1.1_to_1.2.xsl $srcdir/../../../nist/R1100/r1100-scap11-win_rhel-xccdf.xml > $result |
| 17 | |
| 18 | [ -s $result ] |
| 19 | |
| 20 | $OSCAP xccdf validate --skip-schematron $result |
| 21 | |
| 22 | assert_exists 1 '//*[namespace::*="http://checklists.nist.gov/xccdf/1.2"]' |
| 23 | |
| 24 | rm $result |
| 25 | } |
| 26 | |
| 27 | perform_test |