tmpwatch: update URL, fix test (#13386)
This commit is contained in:
parent
2818ad6b20
commit
f0ad81b6e3
1 changed files with 9 additions and 7 deletions
|
@ -1,7 +1,7 @@
|
|||
class Tmpwatch < Formula
|
||||
desc "Find and remove files not accessed in a specified time"
|
||||
homepage "https://fedorahosted.org/tmpwatch/"
|
||||
url "https://fedorahosted.org/releases/t/m/tmpwatch/tmpwatch-2.11.tar.bz2"
|
||||
homepage "https://pagure.io/tmpwatch"
|
||||
url "https://releases.pagure.org/tmpwatch/tmpwatch-2.11.tar.bz2"
|
||||
sha256 "93168112b2515bc4c7117e8113b8d91e06b79550d2194d62a0c174fe6c2aa8d4"
|
||||
|
||||
bottle do
|
||||
|
@ -20,10 +20,12 @@ class Tmpwatch < Formula
|
|||
end
|
||||
|
||||
test do
|
||||
touch %w[a b c]
|
||||
ten_minutes_ago = Time.new - 600
|
||||
File.utime(ten_minutes_ago, ten_minutes_ago, "a")
|
||||
system "#{sbin}/tmpwatch", "2m", testpath
|
||||
assert_equal %w[b c], Dir["*"]
|
||||
mkdir "test" do
|
||||
touch %w[a b c]
|
||||
ten_minutes_ago = Time.new - 600
|
||||
File.utime(ten_minutes_ago, ten_minutes_ago, "a")
|
||||
system "#{sbin}/tmpwatch", "2m", Pathname.pwd
|
||||
assert_equal %w[b c], Dir["*"]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue