summaryrefslogtreecommitdiff
path: root/test/pathname/test_pathname.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/pathname/test_pathname.rb')
-rw-r--r--test/pathname/test_pathname.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/pathname/test_pathname.rb b/test/pathname/test_pathname.rb
index 61d288d68d..8a8c0d9844 100644
--- a/test/pathname/test_pathname.rb
+++ b/test/pathname/test_pathname.rb
@@ -1,3 +1,5 @@
+#!/usr/bin/env ruby
+
require 'test/unit'
require 'pathname'
@@ -183,8 +185,10 @@ class TestPathname < Test::Unit::TestCase
if DOSISH
defassert(:del_trailing_separator, "a", "a\\")
- defassert(:del_trailing_separator, "\225\\".force_encoding("cp932"), "\225\\\\".force_encoding("cp932"))
- defassert(:del_trailing_separator, "\225".force_encoding("cp437"), "\225\\\\".force_encoding("cp437"))
+ require 'Win32API'
+ if Win32API.new('kernel32', 'GetACP', nil, 'L').call == 932
+ defassert(:del_trailing_separator, "\225\\", "\225\\\\") # SJIS
+ end
end
def test_plus