#!/usr/bin/env ruby

require "test/unit"
require "fileutils"

ENV["PATH"] = File.join(Dir.pwd, "..", "..", "..", "svnserve") + ":" + ENV["PATH"]
ext_dir = File.join(Dir.pwd, ".ext")
ext_svn_dir = File.join(ext_dir, "svn")
FileUtils.mkdir_p(ext_svn_dir)
FileUtils.ln_sf(File.join(Dir.pwd, ".libs"), File.join(ext_svn_dir, "ext"))
at_exit {FileUtils.rm_rf(ext_dir)}

$LOAD_PATH.unshift(ext_dir)
$LOAD_PATH.unshift(Dir.pwd)

exit Test::Unit::AutoRunner.run(false, File.dirname($0))

#!/usr/bin/env ruby

require "test/unit"
require "fileutils"

ENV["PATH"] = File.join(Dir.pwd, "..", "..", "..", "svnserve") + ":" + ENV["PATH"]
ext_dir = File.join(Dir.pwd, ".ext")
ext_svn_dir = File.join(ext_dir, "svn")
FileUtils.mkdir_p(ext_svn_dir)
FileUtils.ln_sf(File.join(Dir.pwd, ".libs"), File.join(ext_svn_dir, "ext"))
at_exit {FileUtils.rm_rf(ext_dir)}

$LOAD_PATH.unshift(ext_dir)
$LOAD_PATH.unshift(Dir.pwd)

if Test::Unit::AutoRunner.respond_to?(:standalone?)
  exit Test::Unit::AutoRunner.run($0, File.dirname($0))
else
  exit Test::Unit::AutoRunner.run(false, File.dirname($0))
end

Support Test::Unit distributed in ruby 1.8.3.
Support Test::Unit distributed in ruby 1.8.3.

* subversion/bindings/swig/ruby/test/run-test.rb: Pass $0 instead of false
  as the first argument of Test::Unit::AutoRunner.run when using Test::Unit
  is the one that distributed in ruby 1.8.3.
