[gtksourceview/wip/chergert/vim] add tests for quotes



commit 4918ea405bd401999bc9ca75e44cc22f866bd293
Author: Christian Hergert <chergert redhat com>
Date:   Thu Nov 4 22:45:13 2021 -0700

    add tests for quotes

 testsuite/test-vim-text-object.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
---
diff --git a/testsuite/test-vim-text-object.c b/testsuite/test-vim-text-object.c
index 8c0bc1b8..04988b31 100644
--- a/testsuite/test-vim-text-object.c
+++ b/testsuite/test-vim-text-object.c
@@ -134,6 +134,19 @@ test_quote (void)
        run_test (gtk_source_vim_text_object_new_a_quote_double (), "\"this \"is a string.\"", 6, "\"this 
\"", FALSE);
        run_test (gtk_source_vim_text_object_new_inner_quote_double (), "\"this \"is a string.\"", 7, "is a 
string.", FALSE);
        run_test (gtk_source_vim_text_object_new_inner_quote_double (), "\"this \"is a string.", 7, NULL, 
TRUE);
+       run_test (gtk_source_vim_text_object_new_inner_quote_double (), "\"\"", 0, "", FALSE);
+       run_test (gtk_source_vim_text_object_new_inner_quote_double (), "\"\"", 1, "", FALSE);
+       run_test (gtk_source_vim_text_object_new_inner_quote_double (), " \"\"", 2, "", FALSE);
+       run_test (gtk_source_vim_text_object_new_inner_quote_double (), "\"\" ", 1, "", FALSE);
+       run_test (gtk_source_vim_text_object_new_inner_quote_double (), "\"\" \"", 1, "", FALSE);
+       run_test (gtk_source_vim_text_object_new_inner_quote_double (), "\"a\" \"", 1, "a", FALSE);
+       run_test (gtk_source_vim_text_object_new_a_quote_double (), "\"\"", 0, "\"\"", FALSE);
+       run_test (gtk_source_vim_text_object_new_a_quote_double (), "\"\"", 1, "\"\"", FALSE);
+       run_test (gtk_source_vim_text_object_new_a_quote_double (), " \"\"", 2, "\"\"", FALSE);
+       run_test (gtk_source_vim_text_object_new_a_quote_double (), "\"\" ", 1, "\"\"", FALSE);
+       run_test (gtk_source_vim_text_object_new_a_quote_double (), "\"\" \"", 1, "\"\"", FALSE);
+       run_test (gtk_source_vim_text_object_new_a_quote_double (), "\"a\"b\"", 2, "\"a\"", FALSE);
+       run_test (gtk_source_vim_text_object_new_a_quote_double (), "\"a\"b\"", 3, "\"b\"", FALSE);
 }
 
 int


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