Permalink
Browse files

test added

  • Loading branch information...
1 parent f23ba6f commit e34fd9ab9f5a736569e54d36dc2861a44871067d @vicvega committed Jun 8, 2011
Showing with 13 additions and 3 deletions.
  1. +13 −3 test/test.rb
View
@@ -51,9 +51,9 @@ def test_inc
end
def test_inc_x
- total = File.size("../lib/progressbar.rb")
+ total = File.size("lib/progressbar.rb")
pbar = do_make_progress_bar("test(inc(x))", total)
- File.new("../lib/progressbar.rb").each {|line|
+ File.new("lib/progressbar.rb").each {|line|
sleep(SleepUnit)
pbar.inc(line.length)
}
@@ -95,11 +95,21 @@ def test_total_zero
pbar = do_make_progress_bar("test(total=0)", total)
pbar.finish
end
+
+ def test_custom_bar_mark
+ total = 100
+ pbar = do_make_progress_bar("test(custom)", total)
+ pbar.bar_mark = '='
+ total.times {
+ sleep(SleepUnit)
+ pbar.inc
+ }
+ pbar.finish
+ end
end
class ReversedProgressBarTest < ProgressBarTest
def do_make_progress_bar (title, total)
ReversedProgressBar.new(title, total)
end
end
-

0 comments on commit e34fd9a

Please sign in to comment.