diff options
| author | Mike Naberezny | 2014-04-12 17:44:19 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2014-04-12 21:30:59 -0700 |
| commit | bfc64099fab45b4b46c41760573c503107e523fb (patch) | |
| tree | 3583e9ab84fa7394264a7fe62a67fce9768eefde /Library | |
| parent | 7fda10dfe85fcbbbb0f19048e3f258adfda4ef2e (diff) | |
| download | homebrew-bfc64099fab45b4b46c41760573c503107e523fb.tar.bz2 | |
bulk_extractor: add test
Closes #28362.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/bulk_extractor.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Library/Formula/bulk_extractor.rb b/Library/Formula/bulk_extractor.rb index 60fba2a8e..e0ba49281 100644 --- a/Library/Formula/bulk_extractor.rb +++ b/Library/Formula/bulk_extractor.rb @@ -34,4 +34,15 @@ class BulkExtractor < Formula libexec.install 'java_gui/BEViewer.jar' bin.write_jar_script libexec/"BEViewer.jar", "BEViewer", "-Xmx1g" end + + test do + input_file = testpath/"data.txt" + input_file.write "http://brew.sh\n(201)555-1212\n" + + output_dir = testpath/"output" + system "#{bin}/bulk_extractor", "-o", output_dir, input_file + + assert (output_dir/"url.txt").read.include?("http://brew.sh") + assert (output_dir/"telephone.txt").read.include?("(201)555-1212") + end end |
