[gnome-autoar/wip/oholy/various-fixes: 9/17] tests: Rename tests for conflicts




commit d4452b913f2da9fde2cc785597b005f7c8b677cf
Author: Ondrej Holy <oholy redhat com>
Date:   Thu Mar 4 14:27:46 2021 +0100

    tests: Rename tests for conflicts
    
    The test for conflict contains `test-one-file-` prefix which doesn't make
    much sense here and just makes the name too long. Let's use just `test-`
    prefix instead.

 .../input/arextract.zip                            | Bin
 .../reference/arextract.txt                        |   0
 .../reference/arextract_new.txt                    |   0
 .../input/arextract.zip                            | Bin
 .../reference/arextract.txt                        |   0
 .../input/arextract.zip                            | Bin
 .../reference/arextract.txt                        |   0
 tests/test-extract-unit.c                          |  24 ++++++++++-----------
 8 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/tests/files/extract/test-one-file-conflict-new-destination/input/arextract.zip 
b/tests/files/extract/test-conflict-new-destination/input/arextract.zip
similarity index 100%
rename from tests/files/extract/test-one-file-conflict-new-destination/input/arextract.zip
rename to tests/files/extract/test-conflict-new-destination/input/arextract.zip
diff --git a/tests/files/extract/test-one-file-conflict-new-destination/reference/arextract.txt 
b/tests/files/extract/test-conflict-new-destination/reference/arextract.txt
similarity index 100%
rename from tests/files/extract/test-one-file-conflict-new-destination/reference/arextract.txt
rename to tests/files/extract/test-conflict-new-destination/reference/arextract.txt
diff --git a/tests/files/extract/test-one-file-conflict-new-destination/reference/arextract_new.txt 
b/tests/files/extract/test-conflict-new-destination/reference/arextract_new.txt
similarity index 100%
rename from tests/files/extract/test-one-file-conflict-new-destination/reference/arextract_new.txt
rename to tests/files/extract/test-conflict-new-destination/reference/arextract_new.txt
diff --git a/tests/files/extract/test-one-file-conflict-overwrite/input/arextract.zip 
b/tests/files/extract/test-conflict-overwrite/input/arextract.zip
similarity index 100%
rename from tests/files/extract/test-one-file-conflict-overwrite/input/arextract.zip
rename to tests/files/extract/test-conflict-overwrite/input/arextract.zip
diff --git a/tests/files/extract/test-one-file-conflict-overwrite/reference/arextract.txt 
b/tests/files/extract/test-conflict-overwrite/reference/arextract.txt
similarity index 100%
rename from tests/files/extract/test-one-file-conflict-overwrite/reference/arextract.txt
rename to tests/files/extract/test-conflict-overwrite/reference/arextract.txt
diff --git a/tests/files/extract/test-one-file-conflict-skip-file/input/arextract.zip 
b/tests/files/extract/test-conflict-skip-file/input/arextract.zip
similarity index 100%
rename from tests/files/extract/test-one-file-conflict-skip-file/input/arextract.zip
rename to tests/files/extract/test-conflict-skip-file/input/arextract.zip
diff --git a/tests/files/extract/test-one-file-conflict-skip-file/reference/arextract.txt 
b/tests/files/extract/test-conflict-skip-file/reference/arextract.txt
similarity index 100%
rename from tests/files/extract/test-one-file-conflict-skip-file/reference/arextract.txt
rename to tests/files/extract/test-conflict-skip-file/reference/arextract.txt
diff --git a/tests/test-extract-unit.c b/tests/test-extract-unit.c
index b025470..17a1508 100644
--- a/tests/test-extract-unit.c
+++ b/tests/test-extract-unit.c
@@ -697,7 +697,7 @@ test_multiple_files_different_name (void)
 }
 
 static void
-test_one_file_conflict_overwrite (void)
+test_conflict_overwrite (void)
 {
   /* arextract.zip
    * └── arextract.txt
@@ -718,7 +718,7 @@ test_one_file_conflict_overwrite (void)
   g_autoptr (GFile) reference_file = NULL;
   g_autoptr (AutoarExtractor) extractor = NULL;
 
-  extract_test = extract_test_new ("test-one-file-conflict-overwrite");
+  extract_test = extract_test_new ("test-conflict-overwrite");
 
   if (!extract_test) {
     g_assert_nonnull (extract_test);
@@ -750,7 +750,7 @@ test_one_file_conflict_overwrite (void)
 }
 
 static void
-test_one_file_conflict_new_destination (void)
+test_conflict_new_destination (void)
 {
   /* arextract.zip
    * └── arextract.txt
@@ -772,7 +772,7 @@ test_one_file_conflict_new_destination (void)
   g_autoptr (GFile) reference_file = NULL;
   g_autoptr (AutoarExtractor) extractor = NULL;
 
-  extract_test = extract_test_new ("test-one-file-conflict-new-destination");
+  extract_test = extract_test_new ("test-conflict-new-destination");
 
   if (!extract_test) {
     g_assert_nonnull (extract_test);
@@ -813,7 +813,7 @@ test_one_file_conflict_new_destination (void)
 }
 
 static void
-test_one_file_conflict_skip_file (void)
+test_conflict_skip_file (void)
 {
   /* arextract.zip
    * └── arextract.txt
@@ -834,7 +834,7 @@ test_one_file_conflict_skip_file (void)
   g_autoptr (GFile) reference_file = NULL;
   g_autoptr (AutoarExtractor) extractor = NULL;
 
-  extract_test = extract_test_new ("test-one-file-conflict-skip-file");
+  extract_test = extract_test_new ("test-conflict-skip-file");
 
   if (!extract_test) {
     g_assert_nonnull (extract_test);
@@ -991,12 +991,12 @@ setup_test_suite (void)
   g_test_add_func ("/autoar-extract/test-multiple-files-different-name",
                    test_multiple_files_different_name);
 
-  g_test_add_func ("/autoar-extract/test-one-file-conflict-overwrite",
-                   test_one_file_conflict_overwrite);
-  g_test_add_func ("/autoar-extract/test-one-file-conflict-new-destination",
-                   test_one_file_conflict_new_destination);
-  g_test_add_func ("/autoar-extract/test-one-file-conflict-skip-file",
-                   test_one_file_conflict_skip_file);
+  g_test_add_func ("/autoar-extract/test-conflict-overwrite",
+                   test_conflict_overwrite);
+  g_test_add_func ("/autoar-extract/test-conflict-new-destination",
+                   test_conflict_new_destination);
+  g_test_add_func ("/autoar-extract/test-conflict-skip-file",
+                   test_conflict_skip_file);
 
   g_test_add_func ("/autoar-extract/test-one-file-error-file-over-directory",
                    test_one_file_error_file_over_directory);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]