[evolution/wip/webkit2] Add new tests for forward and backward work delete



commit 734b91d16aaaf64dc38901f7dade753c84337968
Author: Tomas Popela <tpopela redhat com>
Date:   Tue Jul 19 15:39:45 2016 +0200

    Add new tests for forward and backward work delete

 e-util/test-html-editor-units.c |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 deletions(-)
---
diff --git a/e-util/test-html-editor-units.c b/e-util/test-html-editor-units.c
index 43b832e..58148a5 100644
--- a/e-util/test-html-editor-units.c
+++ b/e-util/test-html-editor-units.c
@@ -178,6 +178,36 @@ test_undo_text_typed (TestFixture *fixture)
 }
 
 static void
+test_undo_text_forward_delete (TestFixture *fixture)
+{
+       if (!test_utils_run_simple_test (fixture,
+               "mode:html\n"
+               "type:some text to delete\n"
+               "seq:hCrcrCDc\n"
+               "undo:undo\n"
+               "undo:redo\n"
+               "undo:undo\n",
+               HTML_PREFIX "<p>some text to delete</p>" HTML_SUFFIX,
+               "some text to delete"))
+               g_test_fail ();
+}
+
+static void
+test_undo_text_backward_delete (TestFixture *fixture)
+{
+       if (!test_utils_run_simple_test (fixture,
+               "mode:html\n"
+               "type:some text to delete\n"
+               "seq:hCrcrCbc\n"
+               "undo:undo\n"
+               "undo:redo\n"
+               "undo:undo\n",
+               HTML_PREFIX "<p>some text to delete</p>" HTML_SUFFIX,
+               "some text to delete"))
+               g_test_fail ();
+}
+
+static void
 test_justify_selection (TestFixture *fixture)
 {
        if (!test_utils_run_simple_test (fixture,
@@ -563,6 +593,8 @@ main (gint argc,
        add_test ("/style/monospace/selection", test_style_monospace_selection);
        add_test ("/style/monospace/typed", test_style_monospace_typed);
        add_test ("/undo/text-typed", test_undo_text_typed);
+       add_test ("/undo/text/forward-delete", test_undo_text_forward_delete);
+       add_test ("/undo/text/backward-delete", test_undo_text_backward_delete);
        add_test ("/justify/selection", test_justify_selection);
        add_test ("/justify/typed", test_justify_typed);
        add_test ("/indent/selection", test_indent_selection);


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