Skip to content

Commit

Permalink
Fix some test files to generate sensible TAP output, and to test what…
Browse files Browse the repository at this point in the history
… they're actually testing.
  • Loading branch information
treed committed Jul 16, 2009
1 parent 24e44a2 commit 5a8ce29
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
11 changes: 4 additions & 7 deletions t/00-sanity.t
@@ -1,17 +1,14 @@
puts "1..6" if 1
puts "1..5" if 1

# comments work!
#
puts "ok 1"

puts "ok \
2"
puts "ok 2" ; puts "ok 3"

puts "ok 3" ; puts "ok 4"
print "ok "; print 1 + 3; print "\n"

print "ok "; print 1 + 4; print "\n"

print "ok #{ 2 * 3 }\n"
print "ok #{ 2 * 2 + 1 }\n"



10 changes: 6 additions & 4 deletions t/array/at.t
@@ -1,7 +1,9 @@
puts "1..4"

a = [ 1, 2 ]
puts 'ok ', a[-2]
puts 'ok ', a.at(-1)
puts 'ok ', a.at(1) + 1
puts 'ok ', a.at(1) * 2
puts "ok " + a[-2]
puts "ok " + a.at(-1)
b = a.at(1) + 1
puts "ok " + b
c = a.at(1) * 2
puts "ok " + c
4 changes: 2 additions & 2 deletions t/array/empty.t
Expand Up @@ -4,5 +4,5 @@ plan 2

a = [ 1, 2 ]
nothing = []
proclaim nothing.empty?, ".empty? on Array"
proclaim !a.empty?, ".empty? on Array"
ok nothing.empty?, ".empty? on Array"
nok a.empty?, ".empty? on Array"

0 comments on commit 5a8ce29

Please sign in to comment.