mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-23 05:27:47 +02:00
Test: Corrected util.cpp/confirm calls to check std::cin::eof
This commit is contained in:
parent
3433770e9b
commit
5914418fb1
2 changed files with 17 additions and 13 deletions
|
@ -106,7 +106,7 @@ class TestDelete(TestCase):
|
|||
|
||||
# Would expect 2 yes via input only 1 sent
|
||||
code, out, err = self._validate_prompt_loop(input="y\n")
|
||||
self.assertEqual(code, 0)
|
||||
self.assertEqual(code, 1)
|
||||
|
||||
def test_delete_bulk_prompt_loop(self):
|
||||
"""Delete prompt with closed STDIN causes infinite loop and floods stdout (bulk)"""
|
||||
|
@ -121,7 +121,7 @@ class TestDelete(TestCase):
|
|||
# Would expect 3 yes via input only 2 sent
|
||||
code, out, err = self._validate_prompt_loop(input="y\ny\n")
|
||||
|
||||
self.assertEqual(code, 0)
|
||||
self.assertEqual(code, 1)
|
||||
|
||||
def _validate_prompt_loop(self, input=""):
|
||||
"""Helper method to check if task flooded stream on closed STDIN"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue