diff options
| author | Xu Cheng | 2015-01-03 16:37:43 +0800 |
|---|---|---|
| committer | Mike McQuaid | 2015-01-03 18:41:03 +0000 |
| commit | d4aa0d2ca48a1b0ef4eb05df7e0ecc9dd7ab91b3 (patch) | |
| tree | 9b6cbc56c6cdd5f48f6fdea554859697a944cca4 | |
| parent | 8d9a9baf35a41e4dd02e51e604ea7e499dab33ee (diff) | |
| download | homebrew-d4aa0d2ca48a1b0ef4eb05df7e0ecc9dd7ab91b3.tar.bz2 | |
quilt: add test
Closes #35496.
| -rw-r--r-- | Library/Formula/quilt.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Library/Formula/quilt.rb b/Library/Formula/quilt.rb index 5fa6fdf68..f90d888a3 100644 --- a/Library/Formula/quilt.rb +++ b/Library/Formula/quilt.rb @@ -19,4 +19,16 @@ class Quilt < Formula system "make" system "make", "install" end + + test do + mkdir "patches" + (testpath/"test.txt").write "Hello, World!" + system "#{bin}/quilt", "new", "test.patch" + system "#{bin}/quilt", "add", "test.txt" + rm "test.txt" + (testpath/"test.txt").write "Hi!" + system "#{bin}/quilt", "refresh" + assert_match /-Hello, World!/, File.read("patches/test.patch") + assert_match /\+Hi!/, File.read("patches/test.patch") + end end |
