Skip to content

Commit

Permalink
Merge pull request #1 from rjeschmi/gzip-patch
Browse files Browse the repository at this point in the history
Adding test cases
  • Loading branch information
mboisson authored Feb 22, 2017
2 parents 62677b3 + 74557f2 commit 3a4066a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/framework/filetools.py
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,12 @@ def test_apply_patch(self):
pattern = "I'm a toy, and very proud of it"
self.assertTrue(pattern in patched)

toy_patch_gz = os.path.join(testdir, 'sandbox', 'sources', 'toy', 'toy-0.0_gzip.patch.gz')
self.assertTrue(ft.apply_patch(toy_patch_gz, path))
patched_gz = ft.read_file(os.path.join(path, 'toy-0.0', 'toy.source'))
pattern = "I'm a toy, and very very proud of it"
self.assertTrue(pattern in patched_gz)

# trying the patch again should fail
self.assertErrorRegex(EasyBuildError, "Couldn't apply patch file", ft.apply_patch, toy_patch, path)

Expand Down
Binary file not shown.

0 comments on commit 3a4066a

Please sign in to comment.