From 9b0ffe958f95ebbffa30ac82892da8e639366abf Mon Sep 17 00:00:00 2001 From: Jez Higgins Date: Sat, 9 Jan 2010 21:25:52 +0000 Subject: [PATCH] added the new test script --- examples/XSLT/mangle.cpp | 4 ++-- tests/XSLT/xslt_test_and_check.sh | 13 +++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100755 tests/XSLT/xslt_test_and_check.sh diff --git a/examples/XSLT/mangle.cpp b/examples/XSLT/mangle.cpp index 49c468c8..3bdf085b 100755 --- a/examples/XSLT/mangle.cpp +++ b/examples/XSLT/mangle.cpp @@ -45,7 +45,7 @@ int main(int argc, const char* argv[]) //document.normalize(); stylesheet->execute(document); - +/* std::cout << "\n==============" << std::endl; Arabica::XSLT::DOMSink output; @@ -55,7 +55,7 @@ int main(int argc, const char* argv[]) Arabica::DOM::Node node = output.node(); std::cout << node << std::endl; - +*/ } catch(const std::runtime_error& ex) { diff --git a/tests/XSLT/xslt_test_and_check.sh b/tests/XSLT/xslt_test_and_check.sh new file mode 100755 index 00000000..306226b6 --- /dev/null +++ b/tests/XSLT/xslt_test_and_check.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +./xslt_test -table > test-run.csv +MISMATCH=`diff test.csv test-run.csv | wc -l ` + +if [ 0 -eq $MISMATCH ] +then + exit 0 +fi + +echo "TEST OUTPUT HAS CHANGED" +diff test.csv test-run.csv +exit 1