Skip to content

Commit 01d0cea

Browse files
committed
check error is raised for .txt supplied as patch
1 parent f1b58b3 commit 01d0cea

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/framework/filetools.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1646,6 +1646,10 @@ def test_create_patch_info(self):
16461646
self.assertEqual(ft.create_patch_info({'name': 'foo.txt', 'copy': 'subdir', 'alt_location': 'alt'}),
16471647
{'name': 'foo.txt', 'copy': 'subdir', 'alt_location': 'alt'})
16481648

1649+
expected_error = r"Wrong patch spec \(foo.txt\), extension type should be any of .patch, .patch.bz2, "
1650+
expected_error += ".patch.gz, .patch.xz."
1651+
self.assertErrorRegex(EasyBuildError, expected_error, ft.create_patch_info, 'foo.txt')
1652+
16491653
# faulty input
16501654
error_msg = "Wrong patch spec"
16511655
self.assertErrorRegex(EasyBuildError, error_msg, ft.create_patch_info, None)

0 commit comments

Comments
 (0)