Project

General

Profile

Bug #11609 ยป test_dir.rb

 
require 'tmpdir'
require 'fileutils'
path = File.realpath(Dir.mktmpdir('__test_dir__'))
FileUtils.touch(File.join(path, "}}{}"))
FileUtils.touch(File.join(path, "}}a"))

expected = %w(}}{} }}a).map{|f| File.join(path, f) }
got = Dir.glob(File.join(path, '}}{\{\},a}'))
if expected == got
puts "OK!"
else
puts "expected: %s" % expected.inspect
puts "got: %s" % got.inspect
end

    (1-1/1)