Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 50 lines (43 sloc) 1.048 kB
8884ab5 matz - nakada win32 patch
matz authored
1 #! ./miniruby
a2af08d This commit was generated by cvs2svn to compensate for changes in r372,
matz authored
2
97975b5 @unak * instruby.rb, rubytest.rb (srcdir): no longer embed srcdir into
unak authored
3 exit if defined?(CROSS_COMPILING)
8884ab5 matz - nakada win32 patch
matz authored
4 load './rbconfig.rb'
986c389 Initial revision
matz authored
5 include Config
6
97975b5 @unak * instruby.rb, rubytest.rb (srcdir): no longer embed srcdir into
unak authored
7 ruby = "./#{CONFIG['ruby_install_name']}#{CONFIG['EXEEXT']}"
8 unless File.exist? ruby
9 print "#{ruby} is not found.\n"
2bc48ec 2000-06-12
matz authored
10 print "Try `make' first, then `make test', please.\n"
97975b5 @unak * instruby.rb, rubytest.rb (srcdir): no longer embed srcdir into
unak authored
11 exit false
2bc48ec 2000-06-12
matz authored
12 end
13
07bb9f2 1.4.0
matz authored
14 if File.exist? CONFIG['LIBRUBY_SO']
15 case RUBY_PLATFORM
16 when /-hpux/
17 dldpath = "SHLIB_PATH"
18 when /-aix/
19 dldpath = "LIBPATH"
2194e2c *** empty log message ***
matz authored
20 when /-beos/
21 dldpath = "LIBRARY_PATH"
3f07688 set dldpath on darwin
seki authored
22 when /-darwin/
23 dldpath = "DYLD_LIBRARY_PATH"
07bb9f2 1.4.0
matz authored
24 else
25 dldpath = "LD_LIBRARY_PATH"
26 end
27 x = ENV[dldpath]
28 x = x ? ".:"+x : "."
29 ENV[dldpath] = x
30 end
31
32 if /linux/ =~ RUBY_PLATFORM and File.exist? CONFIG['LIBRUBY_SO']
33 ENV["LD_PRELOAD"] = "./#{CONFIG['LIBRUBY_SO']}"
34 end
35
986c389 Initial revision
matz authored
36 $stderr.reopen($stdout)
37 error = ''
2bc48ec 2000-06-12
matz authored
38
97975b5 @unak * instruby.rb, rubytest.rb (srcdir): no longer embed srcdir into
unak authored
39 srcdir = File.dirname(__FILE__)
40 `#{ruby} -I#{srcdir}/lib #{srcdir}/sample/test.rb`.each do |line|
986c389 Initial revision
matz authored
41 if line =~ /^end of test/
42 print "test succeeded\n"
43 exit 0
44 end
45 error << line if line =~ %r:^(sample/test.rb|not):
46 end
47 print error
48 print "test failed\n"
aeb0665 1.4.1 to be
matz authored
49 exit 1
Something went wrong with that request. Please try again.