Project

General

Profile

Backport #5909

File.expand_path cases has no specs for some cases in Windows

Added by funny_falcon (Yura Sokolov) over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
[ruby-core:42177]

Description

Following cases in file_expand_path has no tests.

http://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/34215/entry/file.c#L2926

irb(main):014:0> Dir.pwd
=> "C:/Ruby193/bin"
irb(main):015:0> File.expand_path('C:asdf', 'D:\home')
=> "C:/Ruby193/bin/asdf"
irb(main):016:0> File.expand_path('C:asdf', 'C:\home')
=> "C:/home/asdf"

http://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/34215/entry/file.c#L2969

irb(main):019:0> Dir.pwd
=> "C:/Ruby193/bin"
irb(main):020:0> File.expand_path('\asdf')
=> "C:/asdf"
irb(main):021:0> File.expand_path('\asdf', 'D:\home')
=> "D:/asdf"

This specs are desirable for testing experimental version of File.expand_path , which uses Windows API
(fenix by Luis Lavena)

Associated revisions

Revision 8b322b5c
Added by naruse (Yui NARUSE) over 7 years ago

merge revision(s) 34338-34340: [Backport #5909]

    * test/ruby/test_file_exhaustive.rb (test_expand_path): add tests for
      absolute paths and drive letters.  [ruby-core:42177]

    * test/ruby/test_file_exhaustive.rb (test_expand_path): ignore case of
      paths on DOSISH platforms.

    * test/ruby/test_file_exhaustive.rb (test_expand_path): fix commit
      miss, removed surplus downcase.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 34503
Added by naruse (Yui NARUSE) over 7 years ago

merge revision(s) 34338-34340: [Backport #5909]

* test/ruby/test_file_exhaustive.rb (test_expand_path): add tests for
  absolute paths and drive letters.  [ruby-core:42177]

* test/ruby/test_file_exhaustive.rb (test_expand_path): ignore case of
  paths on DOSISH platforms.

* test/ruby/test_file_exhaustive.rb (test_expand_path): fix commit
  miss, removed surplus downcase.

History

Updated by funny_falcon (Yura Sokolov) over 7 years ago

I see, issue is resolved by revisions 34338-34340.

Could this tests be backported to ruby-1.9.3 ?

#2

Updated by kosaki (Motohiro KOSAKI) over 7 years ago

  • Tracker changed from Misc to Backport
  • Project changed from Ruby master to Backport193
  • Category deleted (test)
  • Target version deleted (2.0.0)

Updated by usa (Usaku NAKAMURA) over 7 years ago

  • Status changed from Open to Assigned
  • Assignee set to naruse (Yui NARUSE)

naruse-san, do you think that we should backport tests?

Updated by naruse (Yui NARUSE) over 7 years ago

Usaku NAKAMURA wrote:

naruse-san, do you think that we should backport tests?

yes, please

#5

Updated by naruse (Yui NARUSE) over 7 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r34503.
Yura, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


merge revision(s) 34338-34340: [Backport #5909]

* test/ruby/test_file_exhaustive.rb (test_expand_path): add tests for
  absolute paths and drive letters.  [ruby-core:42177]

* test/ruby/test_file_exhaustive.rb (test_expand_path): ignore case of
  paths on DOSISH platforms.

* test/ruby/test_file_exhaustive.rb (test_expand_path): fix commit
  miss, removed surplus downcase.

Also available in: Atom PDF