X-Git-Url: https://git.librecmc.org/?p=oweals%2Fopkg-lede.git;a=blobdiff_plain;f=tests%2Flibopkg_test.c;h=bee39681ee09ccd8b6d0c3f2d548d05469bde725;hp=bf2cff9c18207ce01c10513f36a5340144878b63;hb=c4ec4181cf4dc98c580213ef302f4b9faa655592;hpb=ddb3ebee539287d27ba12f95de8ae972a12c8961 diff --git a/tests/libopkg_test.c b/tests/libopkg_test.c index bf2cff9..bee3968 100644 --- a/tests/libopkg_test.c +++ b/tests/libopkg_test.c @@ -148,6 +148,7 @@ main (int argc, char **argv) "\tlist all - List all available packages\n" "\tlist installed - List all the installed packages\n" "\tremove [package] - Remove the specified package\n" + "\trping - Reposiroties ping, check the accessibility of repositories\n" "\ttest - Run test script\n" , basename (argv[0])); exit (0); @@ -229,9 +230,17 @@ main (int argc, char **argv) break; case 'r': - err = opkg_remove_package (opkg, argv[2], progress_callback, "Removing..."); - printf ("\nopkg_remove_package returned %d (%s)\n", err, errors[err]); - break; + if (argv[1][1] == 'e') + { + err = opkg_remove_package (opkg, argv[2], progress_callback, "Removing..."); + printf ("\nopkg_remove_package returned %d (%s)\n", err, errors[err]); + break; + }else if (argv[1][1] == 'p') + { + err = opkg_repository_accessibility_check(opkg); + printf("\nopkg_repository_accessibility_check returned (%d)\n", err); + break; + } default: printf ("Unknown command \"%s\"\n", argv[1]);