diff --git a/cmake/external/leveldb_patch_test.py b/cmake/external/leveldb_patch_test.py index b1d62526b92..713e11ed101 100644 --- a/cmake/external/leveldb_patch_test.py +++ b/cmake/external/leveldb_patch_test.py @@ -102,7 +102,7 @@ def test_snappy_include_is_amended(self): ) patcher = leveldb_patch.CMakeListsPatcher( lines, - script_name="MyCoolSript", + script_name="MyCoolScript", snappy_source_dir=pathlib.Path("a/b"), snappy_binary_dir=pathlib.Path("c/d"), ) @@ -111,11 +111,11 @@ def test_snappy_include_is_amended(self): self.assertSequenceEqual(patched_lines, [ "target_include_directories(leveldb", - "# BEGIN: leveldb_include_start modification by MyCoolSript", + "# BEGIN: leveldb_include_start modification by MyCoolScript", "PRIVATE", "a/b", "c/d", - "# END: leveldb_include_start modification by MyCoolSript", + "# END: leveldb_include_start modification by MyCoolScript", "PUBLIC", "path1", "path2", @@ -132,7 +132,7 @@ def test_snappy_include_lines_adopt_indenting_and_eol_convention(self): ) patcher = leveldb_patch.CMakeListsPatcher( lines, - script_name="MyCoolSript", + script_name="MyCoolScript", snappy_source_dir=pathlib.Path("a/b"), snappy_binary_dir=pathlib.Path("c/d"), ) @@ -141,11 +141,11 @@ def test_snappy_include_lines_adopt_indenting_and_eol_convention(self): self.assertSequenceEqual(patched_lines, [ "target_include_directories(leveldb\n", - "# BEGIN: leveldb_include_start modification by MyCoolSript \n", + "# BEGIN: leveldb_include_start modification by MyCoolScript \n", " PRIVATE \n", " a/b \n", " c/d \n", - "# END: leveldb_include_start modification by MyCoolSript \n", + "# END: leveldb_include_start modification by MyCoolScript \n", " PUBLIC \n", " path1 \n", " path2 \n", @@ -166,7 +166,7 @@ def test_snappy_include_line_does_not_affect_surrounding_lines(self): ) patcher = leveldb_patch.CMakeListsPatcher( lines, - script_name="MyCoolSript", + script_name="MyCoolScript", snappy_source_dir=pathlib.Path("a/b"), snappy_binary_dir=pathlib.Path("c/d"), ) @@ -177,11 +177,11 @@ def test_snappy_include_line_does_not_affect_surrounding_lines(self): "aaa", "bbb", "target_include_directories(leveldb", - "# BEGIN: leveldb_include_start modification by MyCoolSript", + "# BEGIN: leveldb_include_start modification by MyCoolScript", "PRIVATE", "a/b", "c/d", - "# END: leveldb_include_start modification by MyCoolSript", + "# END: leveldb_include_start modification by MyCoolScript", "PUBLIC", "path1", "path2", @@ -196,7 +196,7 @@ def test_leveldb_snappy_link_line_is_commented_and_replaced(self): ) patcher = leveldb_patch.CMakeListsPatcher( lines, - script_name="MyCoolSript", + script_name="MyCoolScript", snappy_source_dir=pathlib.Path("a/b"), snappy_binary_dir=pathlib.Path("c/d"), ) @@ -204,10 +204,10 @@ def test_leveldb_snappy_link_line_is_commented_and_replaced(self): patched_lines = tuple(patcher.patch()) self.assertSequenceEqual(patched_lines, [ - "# BEGIN: leveldb_snappy_link_line modification by MyCoolSript", + "# BEGIN: leveldb_snappy_link_line modification by MyCoolScript", "# target_link_libraries(leveldb snappy)", "target_link_libraries(leveldb Snappy::Snappy)", - "# END: leveldb_snappy_link_line modification by MyCoolSript", + "# END: leveldb_snappy_link_line modification by MyCoolScript", ]) def test_leveldb_snappy_link_line_has_indent_and_eol_preserved(self): @@ -216,7 +216,7 @@ def test_leveldb_snappy_link_line_has_indent_and_eol_preserved(self): ) patcher = leveldb_patch.CMakeListsPatcher( lines, - script_name="MyCoolSript", + script_name="MyCoolScript", snappy_source_dir=pathlib.Path("a/b"), snappy_binary_dir=pathlib.Path("c/d"), ) @@ -224,10 +224,10 @@ def test_leveldb_snappy_link_line_has_indent_and_eol_preserved(self): patched_lines = tuple(patcher.patch()) self.assertSequenceEqual(patched_lines, [ - "# BEGIN: leveldb_snappy_link_line modification by MyCoolSript \n", + "# BEGIN: leveldb_snappy_link_line modification by MyCoolScript \n", " # target_link_libraries(leveldb snappy) \n", " target_link_libraries(leveldb Snappy::Snappy) \n", - "# END: leveldb_snappy_link_line modification by MyCoolSript \n", + "# END: leveldb_snappy_link_line modification by MyCoolScript \n", ]) def test_leveldb_snappy_link_line_does_not_affect_surrounding_lines(self): @@ -240,7 +240,7 @@ def test_leveldb_snappy_link_line_does_not_affect_surrounding_lines(self): ) patcher = leveldb_patch.CMakeListsPatcher( lines, - script_name="MyCoolSript", + script_name="MyCoolScript", snappy_source_dir=pathlib.Path("a/b"), snappy_binary_dir=pathlib.Path("c/d"), ) @@ -250,10 +250,10 @@ def test_leveldb_snappy_link_line_does_not_affect_surrounding_lines(self): self.assertSequenceEqual(patched_lines, [ "aaa", "bbb", - "# BEGIN: leveldb_snappy_link_line modification by MyCoolSript", + "# BEGIN: leveldb_snappy_link_line modification by MyCoolScript", "# target_link_libraries(leveldb snappy)", "target_link_libraries(leveldb Snappy::Snappy)", - "# END: leveldb_snappy_link_line modification by MyCoolSript", + "# END: leveldb_snappy_link_line modification by MyCoolScript", "ccc", "ddd", ]) @@ -270,30 +270,30 @@ def test_all_patches_combined(self): patcher = leveldb_patch.CMakeListsPatcher( lines, - script_name="MyCoolSript", + script_name="MyCoolScript", snappy_source_dir=pathlib.Path("a/b"), snappy_binary_dir=pathlib.Path("c/d"), ) patched_lines = tuple(patcher.patch()) self.assertSequenceEqual(patched_lines, [ - "# BEGIN: snappy_detect_line modification by MyCoolSript", + "# BEGIN: snappy_detect_line modification by MyCoolScript", """# check_library_exists(snappy snappy_compress "" HAVE_SNAPPY)""", """set(HAVE_SNAPPY ON CACHE BOOL "")""", - "# END: snappy_detect_line modification by MyCoolSript", + "# END: snappy_detect_line modification by MyCoolScript", "target_include_directories(leveldb", - "# BEGIN: leveldb_include_start modification by MyCoolSript", + "# BEGIN: leveldb_include_start modification by MyCoolScript", "PRIVATE", "a/b", "c/d", - "# END: leveldb_include_start modification by MyCoolSript", + "# END: leveldb_include_start modification by MyCoolScript", "PUBLIC", "path1", ")", - "# BEGIN: leveldb_snappy_link_line modification by MyCoolSript", + "# BEGIN: leveldb_snappy_link_line modification by MyCoolScript", "# target_link_libraries(leveldb snappy)", "target_link_libraries(leveldb Snappy::Snappy)", - "# END: leveldb_snappy_link_line modification by MyCoolSript", + "# END: leveldb_snappy_link_line modification by MyCoolScript", ]) def test_idempotence(self): @@ -308,14 +308,14 @@ def test_idempotence(self): patcher1 = leveldb_patch.CMakeListsPatcher( lines, - script_name="MyCoolSript", + script_name="MyCoolScript", snappy_source_dir=pathlib.Path("a/b"), snappy_binary_dir=pathlib.Path("c/d"), ) patched_lines1 = tuple(patcher1.patch()) patcher2 = leveldb_patch.CMakeListsPatcher( patched_lines1, - script_name="MyCoolSript", + script_name="MyCoolScript", snappy_source_dir=pathlib.Path("a/b"), snappy_binary_dir=pathlib.Path("c/d"), )