[gtksourceview/wip/chergert/vim: 294/363] add tests for quotes




commit c20503bc4f36884ee1d2f81d70c69ee1893d1c50
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]