summaryrefslogtreecommitdiff
path: root/test/rake/test_rake_ftp_file.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-11 21:35:01 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-11 21:35:01 +0000
commit9cadc95b28da1cf6ca8f802292d12cc96a4f2c2d (patch)
tree73280968d3426b31c5d0b9da1d3e558aa6f9fcb9 /test/rake/test_rake_ftp_file.rb
parent52c1331763d8b9b8d6362987e6f8847b65ed7f57 (diff)
* NEWS (with all sufficient information):
* lib/rake: Update to rake 10.1.0 * bin/rake: ditto. * test/rake: ditto. * NEWS: Update NEWS to include rake 10.1.0 and links to release notes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rake/test_rake_ftp_file.rb')
-rw-r--r--test/rake/test_rake_ftp_file.rb41
1 files changed, 28 insertions, 13 deletions
diff --git a/test/rake/test_rake_ftp_file.rb b/test/rake/test_rake_ftp_file.rb
index 7f41faf..5749b8a 100644
--- a/test/rake/test_rake_ftp_file.rb
+++ b/test/rake/test_rake_ftp_file.rb
@@ -5,10 +5,11 @@ require 'rake/contrib/ftptools'
class FakeDate
def self.today
- Date.new(2003,10,3)
+ Date.new(2003, 10, 3)
end
+
def self.now
- Time.local(2003,10,3,12,00,00)
+ Time.local(2003, 10, 3, 12, 00, 00)
end
end
@@ -17,43 +18,57 @@ class TestRakeFtpFile < Rake::TestCase
def setup
super
- Rake::FtpFile.class_eval { @date_class = FakeDate; @time_class = FakeDate }
+ Rake::FtpFile.class_eval {
+ @date_class = FakeDate
+ @time_class = FakeDate
+ }
end
def test_general
- file = Rake::FtpFile.new("here", "-rw-r--r-- 1 a279376 develop 121770 Mar 6 14:50 wiki.pl")
+ file = Rake::FtpFile.new(
+ "here",
+ "-rw-r--r-- 1 a279376 develop 121770 Mar 6 14:50 wiki.pl")
assert_equal "wiki.pl", file.name
assert_equal "here/wiki.pl", file.path
assert_equal "a279376", file.owner
assert_equal "develop", file.group
assert_equal 0644, file.mode
- assert_equal 121770, file.size
- assert_equal Time.mktime(2003,3,6,14,50,0,0), file.time
+ assert_equal 121_770, file.size
+ assert_equal Time.mktime(2003, 3, 6, 14, 50, 0, 0), file.time
assert ! file.directory?
assert ! file.symlink?
end
def test_far_date
- file = Rake::FtpFile.new(".", "drwxr-xr-x 3 a279376 develop 4096 Nov 26 2001 vss")
- assert_equal Time.mktime(2001,11,26,0,0,0,0), file.time
+ file = Rake::FtpFile.new(
+ ".",
+ "drwxr-xr-x 3 a279376 develop 4096 Nov 26 2001 vss")
+ assert_equal Time.mktime(2001, 11, 26, 0, 0, 0, 0), file.time
end
def test_close_date
- file = Rake::FtpFile.new(".", "drwxr-xr-x 3 a279376 develop 4096 Nov 26 15:35 vss")
- assert_equal Time.mktime(2002,11,26,15,35,0,0), file.time
+ file = Rake::FtpFile.new(
+ ".",
+ "drwxr-xr-x 3 a279376 develop 4096 Nov 26 15:35 vss")
+ assert_equal Time.mktime(2002, 11, 26, 15, 35, 0, 0), file.time
end
def test_directory
- file = Rake::FtpFile.new(".", "drwxrwxr-x 9 a279376 develop 4096 Mar 13 14:32 working")
+ file = Rake::FtpFile.new(
+ ".",
+ "drwxrwxr-x 9 a279376 develop 4096 Mar 13 14:32 working")
assert file.directory?
assert !file.symlink?
end
def test_symlink
- file = Rake::FtpFile.new(".", "lrwxrwxrwx 1 a279376 develop 64 Mar 26 2002 xtrac -> /home/a279376/working/ics/development/java/com/fmr/fwp/ics/xtrac")
+ file = Rake::FtpFile.new(
+ ".",
+ "lrwxrwxrwx 1 a279376 develop 64 Mar 26 2002 " +
+ "xtrac -> /home/a279376/working/ics/development/java/" +
+ "com/fmr/fwp/ics/xtrac")
assert_equal 'xtrac', file.name
assert file.symlink?
assert !file.directory?
end
end
-