Make test result

[email protected]$G$9!#e(B

e$B!!e(Bmake test e$B$Ke(B bootstraptest
e$B$r4^$a$?$i$I$&$+!"$H$$$&OC$,$"$je(B
e$B$^$7$?!#$D$$$G$K!"e(Bmake test
e$B$Nu67$r>/$7:Y$+$/I=<($9$k$h$&e(B
e$B$J%Q%C%A$r=q$$$F$_$^$7$?!#$3$s$J46$8$G$9!#e(B

e$B!!$$$l$F$b$$$$$G$7$g$&$+!#e(B

$ make test

test_block.rb …
test_bugs.rb
test_class.rb …
test_eval.rb …
test_exception.rb …
test_flow.rb …
test_jump.rb …
test_literal.rb

test_massign.rb …
test_method.rb

test_proc.rb …
test_syntax.rb
…bootstraptest.tmp.rb:2:
warning: class variable access from toplevel

test_thread.rb …
PASS 689 tests

sample/test.rb:assignment

sample/test.rb:condition …
sample/test.rb:if/unless …
sample/test.rb:case …
sample/test.rb:while/until …
sample/test.rb:exception …
sample/test.rb:array …
sample/test.rb:hash …
sample/test.rb:iterator

sample/test.rb:float

sample/test.rb:bignum …
sample/test.rb:string & char

sample/test.rb:assignment …
sample/test.rb:call …
sample/test.rb:proc …
sample/test.rb:signal …
sample/test.rb:eval …
sample/test.rb:system …
sample/test.rb:const …
sample/test.rb:clone …
sample/test.rb:marshal …
sample/test.rb:pack …
sample/test.rb:math …
sample/test.rb:struct …
sample/test.rb:variable …
sample/test.rb:trace …
sample/test.rb:defined? …
sample/test.rb:alias …
sample/test.rb:path …
sample/test.rb:gc …
test succeeded

Index: bootstraptest/runner.rb

— bootstraptest/runner.rb (e$B%j%S%8%g%se(B 12714)
+++ bootstraptest/runner.rb (e$B:n6H%3%T!<e(B)
@@ -73,8 +73,7 @@ def exec_test(pathes)
@errbuf = []
@location = nil
pathes.each do |path|

  • puts
  • puts File.basename(path)
  • $stderr.print "\n#{File.basename(path)} "
    load File.expand_path(path)
    end
    $stderr.puts
    Index: sample/test.rb
    ===================================================================
    — sample/test.rb (e$B%j%S%8%g%se(B 12714)
    +++ sample/test.rb (e$B:n6H%3%T!<e(B)
    @@ -6,7 +6,7 @@ $ntest=0
    $failed = 0

def test_check(what)

  • printf “%s\n”, what
  • STDERR.print "\nsample/test.rb:#{what} "
    $what = what
    $testnum = 0
    end
    @@ -16,11 +16,15 @@ def test_ok(cond,n=1)
    $ntest+=1
    where = (st = caller(n)) ? st[0] : “caller error! (n=#{n},
    trace=#{caller(0).join(’, ')}”
    if cond
  • STDERR.print “.”
    printf “ok %d (%s)\n”, $testnum, where
    else
  • STDERR.print “F”
    printf “not ok %s %d – %s\n”, $what, $testnum, where
    $failed+=1
    end
  • STDOUT.flush
  • STDERR.flush
    end

make sure conditional operators work

Index: rubytest.rb

— rubytest.rb (e$B%j%S%8%g%se(B 12714)
+++ rubytest.rb (e$B:n6H%3%T!<e(B)
@@ -39,7 +39,7 @@ error = ‘’
srcdir = File.dirname(FILE)
#{ruby} -I#{srcdir}/lib #{srcdir}/sample/test.rb.each_line
do |line|
if line =~ /^end of test/

  • print “test succeeded\n”
  • print “\ntest succeeded\n”
    exit true
    end
    error << line if %r:^(sample/test.rb|not): =~ line
    Index: common.mk
    ===================================================================
    — common.mk (e$B%j%S%8%g%se(B 12714)
    +++ common.mk (e$B:n6H%3%T!<e(B)
    @@ -318,6 +318,7 @@ btest: $(MINIRUBY) PHONY
    $(BOOTSTRAPRUBY) “$(srcdir)/bootstraptest/runner.rb”
    –ruby="$(MINIRUBY)" $(OPTS)

test: miniruby$(EXEEXT) $(RBCONFIG) $(PROGRAM) PHONY

  • @$(MINIRUBY) “$(srcdir)/bootstraptest/runner.rb”
    –ruby="$(MINIRUBY)" -q
    @$(MINIRUBY) $(srcdir)/rubytest.rb

test-all:

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:31145] make test result”
on Fri, 6 Jul 2007 15:56:36 +0900, SASADA Koichi [email protected]
writes:

|e$B!!e(Bmake test e$B$Ke(B bootstraptest e$B$r4^$a$?$i$I$&$+!"$H$$$&OC$,$"$je(B
|e$B$^$7$?!#$D$$$G$K!"e(Bmake test e$B$Nu67$r>/$7:Y$+$/I=<($9$k$h$&e(B
|e$B$J%Q%C%A$r=q$$$F$_$^$7$?!#$3$s$J46$8$G$9!#e(B
|
|e$B!!$$$l$F$b$$$$$G$7$g$&$+!#e(B

e$B$J$K$+LdBj$,$"$l$PLa$;[email protected]$7!"F~$l$F$b$$$$$s$8$c$J$$$Ge(B
e$B$7$g$&$+!#e(B

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs