Project

General

Profile

Actions

Bug #3317

closed

test/rake/test_win32.rb does strange tests and reports errors and failures

Added by usa (Usaku NAKAMURA) almost 14 years ago. Updated almost 13 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 1.9.3dev (2010-05-19 trunk 27884) [i386-mswin32]
Backport:
[ruby-core:30309]

Description

=begin
See the results in the end of this message first.

1):
Why this test assume that ruby expands '~' even if ENV["HOME"] is not available?
All other platforms don't expand it in such case, same as ruby on Windows.

2):
Where this constant is defined?

3):
lib/rake/win32.rb sees ENV["AppData"] first, and only when it's not available,
sees ENV["HOME"].
Which is correct, implementation or this test?

4):
Combination of 1) and 3).

C:\ruby>ruby.exe -v test\rake\test_win32.rb
ruby 1.9.3dev (2010-05-19 trunk 27884) [i386-mswin32]
Loaded suite test/rake/test_win32
Started
EE.FF
Finished in 0.010000 seconds.

  1. Error:
    test_win32_system_dir_fallback_to_userprofile_otherwise(Rake::TestWin32):
    ArgumentError: couldn't find HOME environment -- expanding ~' test/rake/test_win32.rb:49:in block in test_win32_system_dir_fallback_to_userprofile_otherwise'
    C:/ruby/test/rake/in_environment.rb:8:in in_environment' test/rake/test_win32.rb:47:in test_win32_system_dir_fallback_to_userprofile_otherwise'

  2. Error:
    test_win32_system_dir_nil_of_no_env_vars(Rake::TestWin32):
    NameError: uninitialized constant Rake::Win32::Win32HomeError
    test/rake/test_win32.rb:62:in block in test_win32_system_dir_nil_of_no_env_vars' C:/ruby/test/rake/in_environment.rb:8:in in_environment'
    test/rake/test_win32.rb:60:in `test_win32_system_dir_nil_of_no_env_vars'

  3. Failure:
    test_win32_system_dir_uses_home_if_defined(Rake::TestWin32) [test/rake/test_win32.rb:13]:
    <"C:/HP/Rake"> expected but was
    <"C:/Users/usa/AppData/Roaming/Rake">.

  4. Failure:
    test_win32_system_dir_uses_homedrive_homepath_when_no_home_defined(Rake::TestWin32) [test/rake/test_win32.rb:24]:
    <"C:/HP/Rake"> expected but was
    <"C:/Users/usa/AppData/Roaming/Rake">.

5 tests, 3 assertions, 2 failures, 2 errors, 0 skips

Test run options: --seed 59256
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0