Skip to content

Commit

Permalink
[Truffle] Fixed specs on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvdrum committed Feb 18, 2015
1 parent 1c54123 commit 4f8ca2f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
12 changes: 3 additions & 9 deletions spec/truffle/truffle.mspec
Expand Up @@ -4,12 +4,6 @@ class MSpecScript
ENV.key?('WINDIR') || ENV.key?('windir')
end

def self.path_separator
# This is going to be used in a regexp, so we need to escape the backslash character in the regexp as well,
# thus the double-escape here.
windows? ? "\\\\" : '/'
end

set :target, File.join(File.dirname(__FILE__), "spec-wrapper#{windows? ? '.bat' : ''}")

set :language, [
Expand Down Expand Up @@ -113,9 +107,9 @@ core += [
]

set :tags_patterns, [
[%r(^.*#{path_separator}language#{path_separator}), 'spec/truffle/tags/language/'],
[%r(^.*#{path_separator}core#{path_separator}), 'spec/truffle/tags/core/'],
[%r(^.*#{path_separator}rubysl#{path_separator}), 'spec/truffle/tags/rubysl/'],
[%r(^.*/language/), 'spec/truffle/tags/language/'],
[%r(^.*/core/), 'spec/truffle/tags/core/'],
[%r(^.*/rubysl/), 'spec/truffle/tags/rubysl/'],
[/_spec.rb$/, '_tags.txt']
]

Expand Down
Expand Up @@ -16,6 +16,7 @@

import org.jruby.truffle.runtime.RubyContext;
import org.jruby.truffle.runtime.core.RubyArray;
import org.jruby.truffle.runtime.core.RubyFile;
import org.jruby.truffle.runtime.core.RubyProc;
import org.jruby.truffle.runtime.core.RubyString;

Expand Down Expand Up @@ -173,7 +174,7 @@ private static RubyArray glob(final RubyContext context, String glob) {
@Override
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
if (matcher.matches(file)) {
array.slowPush(context.makeString(file.toString()));
array.slowPush(context.makeString(RubyFile.expandPath(context, file.toString())));
}

return FileVisitResult.CONTINUE;
Expand Down

0 comments on commit 4f8ca2f

Please sign in to comment.