Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Not Passing On Command Line Arguments

Reply
Thread Tools

Not Passing On Command Line Arguments

 
 
Dylan
Guest
Posts: n/a
 
      07-23-2009
Hey there! I have a question about passing command line arguments. I
have a list of arguments I'd like to use alongside a couple built in
to Test::Case. However, I keep getting an "invalid argument" error
every time. Is there a way to handle my command line arguments and
remove them from the array that gets passed to Test::Case or change
how Test::Case handles arguments? I've tried writing my own
OptionsParser instance in my code, as well as editing autorunner.rb
(where OptionsParser is used in Test::Case) and adding my arguments
there ( o.on('-c', '--cleanup', "Clean up stuff"){puts
"CLEANUPPP!";exit} ), but even if I try to change the arguments that
are already there (Changing the help text, for example), nothing seems
to show up any different. Thanks!

-Dylan
 
Reply With Quote
 
 
 
 
Dylan
Guest
Posts: n/a
 
      07-27-2009
On Jul 23, 10:12*am, Dylan <(E-Mail Removed)> wrote:
> Hey there! I have a question about passing command line arguments. I
> have a list of arguments I'd like to use alongside a couple built in
> to Test::Case. However, I keep getting an "invalid argument" error
> every time. Is there a way to handle my command line arguments and
> remove them from the array that gets passed to Test::Case or change
> how Test::Case handles arguments? I've tried writing my own
> OptionsParser instance in my code, as well as editing autorunner.rb
> (where OptionsParser is used in Test::Case) and adding my arguments
> there ( o.on('-c', '--cleanup', "Clean up stuff"){puts
> "CLEANUPPP!";exit} ), but even if I try to change the arguments that
> are already there (Changing the help text, for example), nothing seems
> to show up any different. Thanks!
>
> -Dylan


Also, for some reason some arguments I add (by simply adding if
(ARGV.include? "-cleanup") ) work fine, but gives an warning:
Deprecated option (--console). Thanks!

-Dylan
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
passing command line arguments to executable mcanjo Python 11 04-06-2010 08:15 PM
passing command line arguments thru ant jimgardener Java 1 10-20-2008 05:30 PM
Passing command line arguments to Ruby or JRuby script. Swati Sharma Ruby 5 04-07-2008 06:44 PM
Passing arguments to a command line from a python script =?iso-8859-1?q?Luis_M._Gonz=E1lez?= Python 6 03-20-2007 03:18 AM
Run Unix shell command $ parse command line arguments in python rkoida@yahoo.com Python 4 04-23-2005 04:42 AM



Advertisments