lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 7c1562e 5/5: Make system_command_test work wi


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 7c1562e 5/5: Make system_command_test work with GNU/Linux
Date: Tue, 2 May 2017 14:56:23 -0400 (EDT)

branch: master
commit 7c1562eec9023b454bbfc571c24e718744a27d9c
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Make system_command_test work with GNU/Linux
---
 system_command_test.cpp | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/system_command_test.cpp b/system_command_test.cpp
index a51ece7..8a52590 100644
--- a/system_command_test.cpp
+++ b/system_command_test.cpp
@@ -44,13 +44,19 @@ int test_main(int, char*[])
     BOOST_TEST_THROW
         (system_command("md5sum --check --status eraseme")
         ,std::runtime_error
-        ,"Exit code 1 from command 'md5sum --check --status eraseme'."
+        ,lmi_test::what_regex
+            ("Exit code [0-9]* from command 'md5sum --check --status 
eraseme'.")
         );
 
+#if !defined LMI_MSW
+    lmi_test::what_regex bad_cmd("Exit code [0-9]* from command 'xyzzy'.");
+#else  // defined LMI_MSW
+    lmi_test::what_regex bad_cmd("Exit code 12345 from command 'xyzzy'.");
+#endif // defined LMI_MSW
     BOOST_TEST_THROW
         (system_command("xyzzy")
         ,std::runtime_error
-        ,"Exit code 12345 from command 'xyzzy'."
+        ,bad_cmd
         );
 
     std::remove("eraseme");



reply via email to

[Prev in Thread] Current Thread [Next in Thread]