diff options
| author | Daniel Burrows <Daniel Burrows Daniel_Burrows@alumni.brown.edu> | 2010-06-10 18:16:36 -0700 |
|---|---|---|
| committer | Daniel Burrows <Daniel Burrows Daniel_Burrows@alumni.brown.edu> | 2010-06-10 18:16:36 -0700 |
| commit | 096e3bc1ee41a9619a9f8faad02da1b5ecf61ea0 (patch) | |
| tree | 71571bd0338fa41aaa798c3d8ba5408de8db19be /tests | |
| parent | 6480c9906a3b67f43742a6b54dd8b2c6af989f84 (diff) | |
| download | aptitude-096e3bc1ee41a9619a9f8faad02da1b5ecf61ea0.tar.gz | |
Add support in the transient message for making a message permanent and advancing to the next line.
i.e., for explicitly outputting a newline. The main advantage of this is
that it lets me give the progress display a mode that emulates the old apt
progress display (specifically, the behavior that completed steps remain
visible).
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/Makefile.am | 4 | ||||
| -rw-r--r-- | tests/test_transient_message.cc | 12 |
2 files changed, 14 insertions, 2 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 79b0db3c..28d501bf 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -17,11 +17,11 @@ $(top_builddir)/src/generic/util/libgeneric-util.a \ -lcppunit \ $(BOOST_TEST_LDFLAGS) $(GMOCK_LDFLAGS) -check_PROGRAMS = cppunit_test boost_test gtest_test +check_PROGRAMS = gtest_test # cppunit_test boost_test gtest_test noinst_PROGRAMS = interactive_set_test -TESTS = cppunit_test boost_test gtest_test +TESTS = gtest_test #cppunit_test boost_test gtest_test EXTRA_DIST = file_caches diff --git a/tests/test_transient_message.cc b/tests/test_transient_message.cc index 6e864ddb..68764780 100644 --- a/tests/test_transient_message.cc +++ b/tests/test_transient_message.cc @@ -93,6 +93,18 @@ TEST_F(TransientMessage, SetText) message->set_text(L"abc"); } +TEST_F(TransientMessage, PreserveAndAdvance) +{ + { + InSequence dummy; + + EXPECT_CALL(*teletype, set_last_line(StrTrimmedRightEq(L"pigeon"))); + EXPECT_CALL(*teletype, newline()); + } + + message->set_text(L"pigeon"); + message->preserve_and_advance(); +} TEST_F(TransientMessage, ClearText) { EXPECT_CALL(*teletype, set_last_line(StrTrimmedRightEq("abc"))); |
