[Groonga-commit] groonga/groonga at f4a7e86 [master] test: remove fragile test

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Sep 13 17:31:10 JST 2018


Kouhei Sutou	2018-09-13 17:31:10 +0900 (Thu, 13 Sep 2018)

  Revision: f4a7e860488e3a283573dc326838d020581ce223
  https://github.com/groonga/groonga/commit/f4a7e860488e3a283573dc326838d020581ce223

  Message:
    test: remove fragile test

  Modified files:
    test/unit/core/test-plugin.c

  Modified: test/unit/core/test-plugin.c (+0 -49)
===================================================================
--- test/unit/core/test-plugin.c    2018-09-13 17:23:58 +0900 (90b257579)
+++ test/unit/core/test-plugin.c    2018-09-13 17:31:10 +0900 (18fd1c3e0)
@@ -122,55 +122,6 @@ test_register_function(void)
 }
 
 void
-test_register_too_long_name(void)
-{
-  GString *long_name;
-  const gchar *full_path;
-  const gchar *error_message_without_path;
-  const gchar *error_message_without_name;
-  gint i, max_name_length;
-
-  long_name = gcut_take_new_string(NULL);
-  max_name_length = (PATH_MAX - strlen(plugins_dir) - 1) - 1;
-  for (i = 0; i < max_name_length; i++) {
-    g_string_append_c(long_name, 'x');
-  }
-  full_path = cut_take_string(g_build_filename(plugins_dir,
-                                               long_name->str,
-                                               NULL));
-  error_message_without_path = "too long plugin path: <";
-  grn_test_assert_send_command_error(
-    context,
-    GRN_FILENAME_TOO_LONG,
-    cut_take_printf("%s%.*s",
-                    error_message_without_path,
-                    (int)(GRN_CTX_MSGSIZE -
-                          strlen(error_message_without_path) -
-                          1),
-                    full_path),
-    cut_take_printf("register %s", long_name->str));
-
-  g_string_append_c(long_name, 'x');
-  full_path = cut_take_string(g_build_filename(plugins_dir,
-                                               long_name->str,
-                                               NULL));
-  error_message_without_name =
-    cut_take_printf("plugin name is too long: %d (max: %d) <",
-                    (int)(long_name->len),
-                    max_name_length);
-  grn_test_assert_send_command_error(
-    context,
-    GRN_INVALID_ARGUMENT,
-    cut_take_printf("%s%.*s",
-                    error_message_without_name,
-                    (int)(GRN_CTX_MSGSIZE -
-                          strlen(error_message_without_name) -
-                          1),
-                    full_path),
-    cut_take_printf("register %s", long_name->str));
-}
-
-void
 test_register_by_absolute_path(void)
 {
   assert_send_command(cut_take_printf("register %s/string", plugins_dir));
-------------- next part --------------
HTML����������������������������...
URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20180913/aeffa630/attachment-0001.htm 



More information about the Groonga-commit mailing list
Back to archive index