From: <mie...@us...> - 2008-01-05 00:30:16
|
Revision: 2068 http://oorexx.svn.sourceforge.net/oorexx/?rev=2068&view=rev Author: miesfeld Date: 2008-01-04 16:30:21 -0800 (Fri, 04 Jan 2008) Log Message: ----------- ooRexxUnit - forward port commit 2058 from 3.2.0 branch to trunk. ooRexxUnit - Redirect shell error messsage so they don't print while the test is running. Modified Paths: -------------- test/trunk/ooRexx/base/keyword/CALL.testGroup test/trunk/ooRexx/base/keyword/SIGNAL.testGroup Modified: test/trunk/ooRexx/base/keyword/CALL.testGroup =================================================================== --- test/trunk/ooRexx/base/keyword/CALL.testGroup 2008-01-05 00:29:46 UTC (rev 2067) +++ test/trunk/ooRexx/base/keyword/CALL.testGroup 2008-01-05 00:30:21 UTC (rev 2068) @@ -708,7 +708,7 @@ Interpret String self~assertSame("subTest9", chk,'*') Return - + Notready: self~assertSame("subTest9a", condition('cs'),'NOTREADY') self~assertSame("subTest9b", condition('d'),cndd) @@ -720,9 +720,17 @@ ::method "test_10" call on error trace off + + -- Prevent error messages from the shell printing on the console. + select + when .ooRexxUnit.OSName == "WINDOWS"then toNull = '1>nul 2>&1' + when .ooRexxUnit.OSName == "LINUX"then toNull = '>/dev/null 2>&1' + otherwise toNull = "" -- Not sure what works on other OSes + end + caught = .false - 'zxyabc' -- deliberate error, this command should not be found! - if \caught then self~assertTrue("subTest_1", 0) + 'zxyabc' toNull -- deliberate error, this command should not be found! + self~assertTrue("Error should be caught", caught) return error: @@ -771,9 +779,17 @@ ::method "test_13" call on failure trace off + + -- Prevent error messages from the shell printing on the console. + select + when .ooRexxUnit.OSName == "WINDOWS"then toNull = '1>nul 2>&1' + when .ooRexxUnit.OSName == "LINUX"then toNull = '>/dev/null 2>&1' + otherwise toNull = "" -- Not sure what works on other OSes + end + caught = .false - 'zxyabc' -- deliberate failure, this command should not be found! - if \caught then self~assertTrue("subTest_1", 0) + 'zxyabc' toNull -- deliberate failure, this command should not be found! + self~assertTrue("Error should be caught", caught) return failure: Modified: test/trunk/ooRexx/base/keyword/SIGNAL.testGroup =================================================================== --- test/trunk/ooRexx/base/keyword/SIGNAL.testGroup 2008-01-05 00:29:46 UTC (rev 2067) +++ test/trunk/ooRexx/base/keyword/SIGNAL.testGroup 2008-01-05 00:30:21 UTC (rev 2068) @@ -178,7 +178,15 @@ ::method "test_5" signal on error trace off - 'zxyabc' -- deliberate error, this command should not be found! + + -- Prevent error messages from the shell printing on the console. + select + when .ooRexxUnit.OSName == "WINDOWS"then toNull = '1>nul 2>&1' + when .ooRexxUnit.OSName == "LINUX"then toNull = '>/dev/null 2>&1' + otherwise toNull = "" -- Not sure what works on other OSes + end + + 'zxyabc' toNull -- deliberate error, this command should not be found! self~assertTrue("subTest_5", 0) return @@ -223,7 +231,15 @@ ::method "test_8" signal on failure trace off - 'zxyabc' -- deliberate failure, this command should not be found! + + -- Prevent error messages from the shell printing on the console. + select + when .ooRexxUnit.OSName == "WINDOWS"then toNull = '1>nul 2>&1' + when .ooRexxUnit.OSName == "LINUX"then toNull = '>/dev/null 2>&1' + otherwise toNull = "" -- Not sure what works on other OSes + end + + 'zxyabc' toNull -- deliberate failure, this command should not be found! self~assertTrue("subTest_5", 0) return This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |