Add tests for #835

Also add ErrnoGuard before `isatty` call, because apparently it can set
errno to 25 (ENOTTY).
This commit is contained in:
Martin Hořeňovský
2017-03-06 22:07:33 +01:00
parent 613e1466f9
commit ace70407a2
7 changed files with 92 additions and 12 deletions

View File

@@ -48,6 +48,23 @@ PASSED:
with expansion:
42 == {?}
-------------------------------------------------------------------------------
#835 -- errno should not be touched by Catch
-------------------------------------------------------------------------------
MiscTests.cpp:<line number>
...............................................................................
MiscTests.cpp:<line number>: FAILED:
CHECK( f() == 0 )
with expansion:
1 == 0
MiscTests.cpp:<line number>:
PASSED:
REQUIRE( (*__errno_location ()) == 1 )
with expansion:
1 == 1
-------------------------------------------------------------------------------
'Not' checks that should fail
-------------------------------------------------------------------------------
@@ -9350,6 +9367,6 @@ MiscTests.cpp:<line number>:
PASSED:
===============================================================================
test cases: 164 | 118 passed | 44 failed | 2 failed as expected
assertions: 957 | 851 passed | 88 failed | 18 failed as expected
test cases: 165 | 118 passed | 45 failed | 2 failed as expected
assertions: 959 | 852 passed | 89 failed | 18 failed as expected