summary refs log tree commit diff
path: root/bin
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2007-12-05 01:49:33 +0100
committerChristian Neukirchen <chneukirchen@gmail.com>2007-12-05 01:49:33 +0100
commit4b38b8e7b8943c91c72fa1b5f74c64f9ca94f6d1 (patch)
treedab97a8f4f0ae0608baeb000f4b519e0317beae6 /bin
parent4bd8f7f165ba8113870a6be9ee4f11474aea892d (diff)
downloadbacon-4b38b8e7b8943c91c72fa1b5f74c64f9ca94f6d1.tar.gz
bacon-4b38b8e7b8943c91c72fa1b5f74c64f9ca94f6d1.tar.xz
bacon-4b38b8e7b8943c91c72fa1b5f74c64f9ca94f6d1.zip
Implement -n and -t for filtering on context/specification names
darcs-hash:20071205004933-4fc50-bf25adcb3aa94bded121b452ad17a15a1c38c1f5.gz
Diffstat (limited to 'bin')
-rwxr-xr-xbin/bacon5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/bacon b/bin/bacon
index 60997d8..dd01064 100755
--- a/bin/bacon
+++ b/bin/bacon
@@ -2,6 +2,7 @@
 # -*- ruby -*-
 
 require 'optparse'
+module Bacon; end
 
 automatic = false
 output = 'SpecDoxOutput'
@@ -56,12 +57,12 @@ opts = OptionParser.new("", 24, '  ') { |opts|
 
   opts.on('-n', '--name NAME', String,
           "runs tests matching regexp NAME") { |n|
-    # TODO
+    Bacon.const_set :RestrictName, Regexp.new(n)
   }
   
   opts.on('-t', '--testcase TESTCASE', String,
           "runs tests in TestCases matching regexp TESTCASE") { |t|
-    # TODO
+    Bacon.const_set :RestrictContext, Regexp.new(t)
   }
 
   opts.separator ""