1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
#!/bin/bash
#
# Copyright (C) 2012-2015 SUSE Linux GmbH
#
# Author:
# Frank Sundermeyer <fsundermeyer at opensuse dot org>
#
# Testing DAPS: source-validation
#
# * Are the XML sources of the test document well formed ?
#
source lib/common_functions
header "Document Source Validation"
function oneTimeTearDown() {
stats
}
#---------------------------------------------------------------
# TESTS
#---------------------------------------------------------------
test_validSources () {
local _MAIN_FILE
for _MAIN_FILE in "$_MAINPATH" "$_MAINPATH_NOPROF"; do
xmllint --nonet --noout --nowarning --xinclude --loaddtd $_MAIN_FILE 2>&1
assertTrue \
" └─ XML sources for MAIN=$(basename $_MAIN_FILE) do not validate" \
"$?"
done
}
# source shUnit2 test
source $_SHUNIT2SRC
|