This is an automated email from the ASF dual-hosted git repository.

borisk pushed a commit to branch xerces-3.2
in repository https://gitbox.apache.org/repos/asf/xerces-c.git

commit 12eecd6b97840b3b49147f6c4245295d83c1198d
Author: Boris Kolpackov <bo...@codesynthesis.com>
AuthorDate: Wed Dec 13 08:46:59 2023 +0200

    Fix NetAccessorTest to exit with non-zero status in case of error
---
 tests/src/NetAccessorTest/NetAccessorTest.cpp | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/tests/src/NetAccessorTest/NetAccessorTest.cpp 
b/tests/src/NetAccessorTest/NetAccessorTest.cpp
index 3bb735bd0..c2affbd0e 100644
--- a/tests/src/NetAccessorTest/NetAccessorTest.cpp
+++ b/tests/src/NetAccessorTest/NetAccessorTest.cpp
@@ -122,6 +122,8 @@ main(int argc, char** argv)
     // Get the URL
     char* url = argv[1];
     
+    int r = 1;
+
     // Do the test
     try
     {
@@ -148,11 +150,11 @@ main(int argc, char** argv)
                
                // Delete the is
                delete is;
-       
+               r = 0;
     }
     catch(const XMLException& toCatch)
     {
-        XERCES_STD_QUALIFIER cout << "Exception during test:\n    "
+        XERCES_STD_QUALIFIER cerr << "Exception during test:\n    "
              << toCatch.getMessage()
              << XERCES_STD_QUALIFIER endl;
     }
@@ -160,6 +162,6 @@ main(int argc, char** argv)
     // And call the termination method
     XMLPlatformUtils::Terminate();
 
-    return 0;
+    return r;
 }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscr...@xerces.apache.org
For additional commands, e-mail: c-dev-h...@xerces.apache.org

Reply via email to