Sha256: 71a3e27e150c833953e1f2b33a69ec99d4d67cb785bc6bdcbc757a821117f611

Contents?: true

Size: 1.5 KB

Versions: 1

Compression:

Stored size: 1.5 KB

Contents

require 'test/code/rubylexervsruby'
#ENV['RUBY']||='ruby'
$RUBY=ENV['RUBY']||'ruby'
#test $RUBY || export RUBY=ruby

#$RUBYLEXERVSRUBY="#$RUBY test/code/rubylexervsruby.rb"

RUBY_VERSION[/^1\.[0-7]\./] and raise 'need ruby>= 1.8'



#if RUBY_VERSION --version|grep '^ruby 1\.6'; then
#  echo 'error: need ruby 1.8'; exit
#fi


RLROOT= (File.dirname $0)+'/../..'
#cd `dirname -- $0`

=begin if locate fails, we should use the algorithm from this sh code

#also look in bin and lib directories
file -L `echo $PATH":/sbin:/usr/sbin"|tr : "\n"|sort -u|xargs -i echo "{}/*"`| \
 grep "ruby[^:]*script"|cut -d: -f1 > test/results/rubyexelibs

ruby -e 'print ($:.sort.uniq+[""]).join"\n"'|xargs -i ls "{}/*.rb" >> test/results/rubyexelibs

   for i in `cat test/results/rubyexelibs`; do
      $RUBYLEXERVSRUBY $i;
   done

=end

for i in [
  RLROOT+"/test/data/p.rb", *Dir["test/data/*.rb"]+`(locate /tk.rb;
  locate examples/examples_test.rb;locate .rb; locate rakefile; 
  locate Rakefile; locate RAKEFILE)|egrep -v '/test/(results|data)/'`.
    split("\n")
] do
#  system $RUBYLEXERVSRUBY, i
  #hmm, rubylexervsruby needs to be upgraded to not regard an output
  #consisting entirely of warnings as a failure.
  #if no 'warning' (in any capitalization) for 4 or more lines
  RubyLexerVsRuby.rubylexervsruby i #or fail "failed in #{i}"
end

#for i in test/data/p.rb `(locate /tk.rb;locate examples/examples_test.rb;#locate .rb; locate rakefile; locate Rakefile; locate RAKEFILE)|egrep -v '/#test/results/'`; do
#  $RUBYLEXERVSRUBY $i
#done

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rubylexer-0.7.0 test/code/locatetest.rb