[gtksourceview/wip/chergert/vim] more tests for blocks



commit 1fe7f8e3bec4962c650ce186c36dd3fdfd0305d0
Author: Christian Hergert <chergert redhat com>
Date:   Thu Nov 4 22:56:35 2021 -0700

    more tests for blocks

 testsuite/test-vim-text-object.c | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)
---
diff --git a/testsuite/test-vim-text-object.c b/testsuite/test-vim-text-object.c
index d91e5efe..01d14917 100644
--- a/testsuite/test-vim-text-object.c
+++ b/testsuite/test-vim-text-object.c
@@ -101,15 +101,9 @@ test_WORD (void)
 static void
 test_block (void)
 {
-       run_test (gtk_source_vim_text_object_new_a_block_paren (),
-                 "this_is_a_function (some stuff\n  and some more)\ntrailing",
-                 23, "(some stuff\n  and some more)", FALSE);
-       run_test (gtk_source_vim_text_object_new_inner_block_paren (),
-                 "this_is_a_function (some stuff\n  and some more)\ntrailing",
-                 23, "some stuff\n  and some more", FALSE);
-       run_test (gtk_source_vim_text_object_new_inner_block_paren (),
-                 "(should not match\n", 5, NULL, TRUE);
-
+       run_test (gtk_source_vim_text_object_new_a_block_paren (), "this_is_a_function (some stuff\n  and 
some more)\ntrailing", 23, "(some stuff\n  and some more)", FALSE);
+       run_test (gtk_source_vim_text_object_new_inner_block_paren (), "this_is_a_function (some stuff\n  and 
some more)\ntrailing", 23, "some stuff\n  and some more", FALSE);
+       run_test (gtk_source_vim_text_object_new_inner_block_paren (), "(should not match\n", 5, NULL, TRUE);
        run_test (gtk_source_vim_text_object_new_inner_block_paren (), "(m)", 0, "m", FALSE);
        run_test (gtk_source_vim_text_object_new_inner_block_paren (), "(m)", 1, "m", FALSE);
        run_test (gtk_source_vim_text_object_new_inner_block_paren (), "(m)", 2, "m", FALSE);
@@ -123,6 +117,13 @@ test_block (void)
        run_test (gtk_source_vim_text_object_new_inner_block_paren (), "()", 0, "", FALSE);
        run_test (gtk_source_vim_text_object_new_a_block_paren (), "() ", 1, "()", FALSE);
        run_test (gtk_source_vim_text_object_new_a_block_paren (), "() ", 0, "()", FALSE);
+       run_test (gtk_source_vim_text_object_new_a_block_lt_gt (), "<a></a>", 0, "<a>", FALSE);
+       run_test (gtk_source_vim_text_object_new_inner_block_lt_gt (), "<a>", 0, "a", FALSE);
+       run_test (gtk_source_vim_text_object_new_inner_block_lt_gt (), "<a>", 2, "a", FALSE);
+       run_test (gtk_source_vim_text_object_new_inner_block_lt_gt (), "<a></a>", 0, "a", FALSE);
+       run_test (gtk_source_vim_text_object_new_inner_block_lt_gt (), "<a></a>", 1, "a", FALSE);
+       run_test (gtk_source_vim_text_object_new_inner_block_lt_gt (), "<a></a>", 2, "a", FALSE);
+       run_test (gtk_source_vim_text_object_new_inner_block_lt_gt (), "<a></a>", 3, "/a", FALSE);
 }
 
 static void


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