Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Re-tagging 1.0

git-svn-id: http://svn.codehaus.org/jruby/tags/jruby-1_0@3851 961051c9-f516-0410-bf72-c9f7e237a7b7
  • Loading branch information...
commit ca6f5a397f6f5e393b749f9ff9026542bd30c240 2 parents 001d0da + 479a80d
@nicksieger nicksieger authored
View
4 build.xml
@@ -410,7 +410,7 @@ test/externals/rubinius/spec/parser"/></antcall>
<target name="run-junit-interpreted" description="runs junit tests">
<taskdef name="junit" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask" classpath="${lib.dir}/junit.jar"/>
- <junit fork="yes" haltonfailure="true" dir="${basedir}" maxmemory="384M">
+ <junit fork="yes" haltonfailure="true" dir="${basedir}" maxmemory="384M" showoutput="true">
<classpath>
<pathelement location="${jruby.instrumented.classes.dir}" />
<path refid="build.classpath"/>
@@ -441,7 +441,7 @@ test/externals/rubinius/spec/parser"/></antcall>
<target name="run-junit-compiled" description="runs junit tests">
<taskdef name="junit" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask" classpath="${lib.dir}/junit.jar"/>
- <junit fork="yes" haltonfailure="true" dir="${basedir}" maxmemory="384M">
+ <junit fork="yes" haltonfailure="true" dir="${basedir}" maxmemory="384M" showoutput="true">
<classpath>
<pathelement location="${jruby.instrumented.classes.dir}" />
<path refid="build.classpath"/>
View
4 test/externals/rubinius/spec/language/literals/execution_spec.rb
@@ -3,13 +3,13 @@
context "Execution literal" do
specify "`` should return the result of the executed sub-process" do
ip = 'world'
- `echo disc #{ip}`.should == "disc world\n"
+ `echo disc #{ip}`.chomp.should == "disc world"
end
# NOTE: Interpolation ? It's not consistant with %w for example.
specify "%x() is the same (with also interpolation)" do
ip = 'world'
- %x(echo disc #{ip}).should == "disc world\n"
+ %x(echo disc #{ip}).chomp.should == "disc world"
end
# NOTE: %X doesn't exist.
View
13 test/testFile.rb
@@ -1,5 +1,5 @@
require 'test/minirunit'
-
+require 'rbconfig'
test_check "Test File"
# dry tests which don't access the file system
@@ -24,6 +24,9 @@
test_equal("b", File.basename("a/b/"))
test_equal("/", File.basename("/"))
+# JRUBY-1116: these are currently broken on windows
+# what are these testing anyway?!?!
+unless Config::CONFIG['target_os'] =~ /Windows/
test_equal("/bin", File.expand_path("../../bin", "/foo/bar"))
test_equal("/foo/bin", File.expand_path("../bin", "/foo/bar"))
test_equal("//abc/def/jkl/mno", File.expand_path("//abc//def/jkl//mno"))
@@ -45,6 +48,7 @@
test_equal(File.join(Dir.pwd, "x/y/z/a/b"), File.expand_path("a/b", "x/y/z"))
test_equal(File.join(Dir.pwd, "bin"), File.expand_path("../../bin", "tmp/x"))
test_equal("/bin", File.expand_path("./../foo/./.././../bin", "/a/b"))
+end # unless windows
# Until windows and macos have code to get this info correctly we will
# not include
@@ -203,7 +207,7 @@
File.utime(time, time, filename)
# File mtime resolution may not be sub-second on all platforms (e.g., windows)
# allow for some slop
-test_ok (time.to_i - File.mtime(filename).to_i).abs < 2
+test_ok (time.to_i - File.mtime(filename).to_i).abs < 5
File.unlink(filename)
# File::Stat tests
@@ -246,9 +250,10 @@
test_equal(File::FNM_CASEFOLD, File::FNM_SYSCASE)
# JRUBY-1025: negative int passed to truncate should raise EINVAL
+tmp = ENV['TEMP'] || ENV['TMPDIR'] || ENV['TMP'] || '/tmp'
test_exception(Errno::EINVAL) {
- File.open("/tmp/truncate_test_file", 'w').truncate(-1)
+ File.open("#{tmp}/truncate_test_file", 'w').truncate(-1)
}
test_exception(Errno::EINVAL) {
- File.truncate("/tmp/truncate_test_file", -1)
+ File.truncate("#{tmp}/truncate_test_file", -1)
}
View
5 test/test_process.rb
@@ -4,9 +4,10 @@
class TestProcess < Test::Unit::TestCase
def setup
@shell = Config::CONFIG['SHELL']
- system(%{#@shell -c "exit 1"})
+ @shellcmd = "#@shell " + (Config::CONFIG['host_os'] =~ /Windows/ ? "/c" : "-c")
+ system(%{#@shellcmd "exit 1"})
@first_status = $?
- system(%{#@shell -c "exit 2"})
+ system(%{#@shellcmd "exit 2"})
@second_status = $?
end
Please sign in to comment.
Something went wrong with that request. Please try again.