Commit 1436b1b85577ee834a6c70fc7c9ddcc3513dcd2a

Thomas de Grivel 2024-07-24T18:25:41

fix libkc3_test argv0

diff --git a/test/libkc3_test.c b/test/libkc3_test.c
index 3d2bcca..9c466a7 100644
--- a/test/libkc3_test.c
+++ b/test/libkc3_test.c
@@ -42,9 +42,9 @@ void types_test (void);
 
 int main (int argc, char **argv)
 {
+  test_init(&argc, &argv);
   if (! kc3_init(NULL, &argc, &argv))
     return 1;
-  test_init(&argc, &argv);
   if (test_target("types")) {
     fprintf(stderr, "\ntypes\n");
     types_test();
@@ -149,8 +149,8 @@ int main (int argc, char **argv)
     fprintf(stderr, "\nenv\n");
     env_test();
   }
+  kc3_clean(NULL);
   test_summary();
   test_clean();
-  kc3_clean(NULL);
   return 0;
 }