From 31d7c8bce3d7338d9fe3cfcff522631943331f84 Mon Sep 17 00:00:00 2001 From: Clifford Yapp <238416+starseeker@users.noreply.github.com> Date: Fri, 22 Nov 2024 11:24:09 -0500 Subject: [PATCH] No longer have ged_ls, not validating argv[0] --- src/libged/tests/plugins.cpp | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/src/libged/tests/plugins.cpp b/src/libged/tests/plugins.cpp index b8f392b2c38..310d4db725c 100644 --- a/src/libged/tests/plugins.cpp +++ b/src/libged/tests/plugins.cpp @@ -390,33 +390,13 @@ main(int ac, char *av[]) { wav[1] = NULL; int ret = ged_exec(gbp, 1, (const char **)wav); if (ret & GED_UNKNOWN && wav[0] != wav0) { - bu_log("\nged_ls called with command name \"%s\" correctly returned with GED_UNKNOWN set\n", wav0); + bu_log("\nged_exec called with command name \"%s\" correctly returned with GED_UNKNOWN set\n", wav0); } else { if (!(ret & GED_UNKNOWN)) { - bu_log("\nged_ls called with command name \"%s\" did not return with GED_UNKNOWN set\n", wav0); + bu_log("\nged_exec called with command name \"%s\" did not return with GED_UNKNOWN set\n", wav0); } if (wav[0] == wav0) { - bu_log("\nged_ls called with command name \"%s\" did not override wav[0]\n", wav0); - } - } - } - - /* Deliberately call a ged function with wrong argv[0] (which is a valid - * command, just not one matching the function) */ - { - const char *wav1 = "search"; - const char *wav[2]; - wav[0] = wav1; - wav[1] = NULL; - int ret = ged_exec(gbp, 1, (const char **)wav); - if (ret & GED_UNKNOWN && wav[0] != wav1) { - bu_log("\nged_ls called with command name \"%s\" correctly returned with GED_UNKNOWN set\n", wav1); - } else { - if (!(ret & GED_UNKNOWN)) { - bu_log("\nged_ls called with command name \"%s\" did not return with GED_UNKNOWN set\n", wav1); - } - if (wav[0] == wav1) { - bu_log("\nged_ls called with command name \"%s\" did not override wav[0]\n", wav1); + bu_log("\nged_exec called with command name \"%s\" did not override wav[0]\n", wav0); } } }