From d4aa0d2ca48a1b0ef4eb05df7e0ecc9dd7ab91b3 Mon Sep 17 00:00:00 2001 From: Xu Cheng Date: Sat, 3 Jan 2015 16:37:43 +0800 Subject: quilt: add test Closes #35496. --- Library/Formula/quilt.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Library/Formula') 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 -- cgit v1.2.3