blob: c7937d587ed493ccce848da2a4a5aa02905d9f0f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
class SafeRm < Formula
homepage "https://launchpad.net/safe-rm"
url "https://launchpad.net/safe-rm/trunk/0.12/+download/safe-rm-0.12.tar.gz"
sha1 "f0abd96a6898ad64389bf4be8773c899986b4618"
head "https://gitorious.org/safe-rm/mainline.git"
def install
bin.install "safe-rm"
end
test do
foo = testpath/"foo"
bar = testpath/"bar"
(testpath/".config").mkdir
(testpath/".config/safe-rm").write bar
touch foo
touch bar
system "#{bin}/safe-rm", foo
assert !File.exist?(foo)
shell_output("#{bin}/safe-rm #{bar} 2>&1", 64)
assert File.exist?(bar)
end
end
|