Skip to content

Commit

Permalink
Merge pull request #183628 from alebcay/ripmime-test
Browse files Browse the repository at this point in the history
ripmime: add test block
  • Loading branch information
BrewTestBot authored Sep 5, 2024
2 parents ecb3552 + 6729db6 commit f5418ae
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Formula/r/ripmime.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,28 @@ def install
bin.install "ripmime"
man1.install "ripmime.1"
end

test do
(testpath/"message.eml").write <<~EOS
MIME-Version: 1.0
Subject: Test email
To: example@example.org
Content-Type: multipart/mixed;
boundary="XXXXboundary text"
--XXXXboundary text
Content-Type: text/plain;
name="attachment.txt"
Content-Disposition: attachment;
filename="attachment.txt"
Content-Transfer-Encoding: base64
SGVsbG8gZnJvbSBIb21lYnJldyEK
--XXXXboundary text--
EOS

system bin/"ripmime", "-i", "message.eml"
assert_equal "Hello from Homebrew!\n", (testpath/"attachment.txt").read
end
end

0 comments on commit f5418ae

Please sign in to comment.