[gspell/wip/tune-current-word] current word: more unit tests
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gspell/wip/tune-current-word] current word: more unit tests
- Date: Mon, 29 Feb 2016 17:54:03 +0000 (UTC)
commit b46b9a33864b1db0cedd4ff5da88947872b2365a
Author: Sébastien Wilmet <swilmet gnome org>
Date: Mon Feb 29 18:52:56 2016 +0100
current word: more unit tests
testsuite/test-inline-checker-text-buffer.c | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/testsuite/test-inline-checker-text-buffer.c b/testsuite/test-inline-checker-text-buffer.c
index f46dbec..28fe519 100644
--- a/testsuite/test-inline-checker-text-buffer.c
+++ b/testsuite/test-inline-checker-text-buffer.c
@@ -344,7 +344,9 @@ test_current_word (void)
6, 10,
-1);
- /* Delete the 'e' programmatically, not at the cursor position. */
+ /* Delete the 'e' programmatically, not at the cursor position.
+ * Hello -> Hllo
+ */
gtk_text_buffer_get_iter_at_offset (buffer, &start, 1);
gtk_text_buffer_get_iter_at_offset (buffer, &end, 2);
gtk_text_buffer_delete (buffer, &start, &end);
@@ -354,6 +356,16 @@ test_current_word (void)
5, 9, /* "nrst" still highlighted */
-1);
+ /* Insert 'e' programmatically, not at the cursor position.
+ * Hllo -> Hello
+ */
+ gtk_text_buffer_get_iter_at_offset (buffer, &iter, 1);
+ gtk_text_buffer_insert (buffer, &iter, "e", -1);
+ check_highlighted_words (buffer,
+ inline_checker,
+ /*6, 10,*/ /* FIXME: "nrst" should still be highlighted */
+ -1);
+
g_object_unref (inline_checker);
g_object_unref (buffer);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]