clutil 2010.331.1 → 2011.009.1
Sign up to get free protection for your applications and to get access to all the features.
- data/cl/util/test/filetest.rb +14 -0
- metadata +4 -4
data/cl/util/test/filetest.rb
CHANGED
@@ -201,6 +201,20 @@ class TestBackup < TempDirTest
|
|
201
201
|
dst = File.join(@b_dir, File.basename(src))
|
202
202
|
assert_equal(true, File.backup(src, dst))
|
203
203
|
|
204
|
+
File.utime(0, 0, dst)
|
205
|
+
assert_equal(true, File.backup(src, dst))
|
206
|
+
assert_equal(true, File.backup(src, dst))
|
207
|
+
end
|
208
|
+
|
209
|
+
def test_backed_up_because_exists_different_mtime_but_install_returns_false
|
210
|
+
# a complicated case: the dst file exists, has the exact same content,
|
211
|
+
# but has a different timestamp (perhaps due to time zone glitchery).
|
212
|
+
# the file should come back as backed up, but have its mtime updated to match
|
213
|
+
# the src so it won't trigger the next time a compare is done
|
214
|
+
src = make_sample_text_file('a')
|
215
|
+
dst = File.join(@b_dir, File.basename(src))
|
216
|
+
assert_equal(true, File.backup(src, dst))
|
217
|
+
|
204
218
|
File.utime(0, 0, dst)
|
205
219
|
assert_equal(true, File.backup(src, dst))
|
206
220
|
end
|
metadata
CHANGED
@@ -3,10 +3,10 @@ name: clutil
|
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
|
-
-
|
7
|
-
-
|
6
|
+
- 2011
|
7
|
+
- 9
|
8
8
|
- 1
|
9
|
-
version:
|
9
|
+
version: 2011.009.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- chrismo
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date:
|
17
|
+
date: 2011-01-09 00:00:00 -06:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|