10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I want to do caseless string comparision using test command
for eg: Ind_f="y"
test "$Ind_f" == "y|Y"
i tried , ** , nothing worked.
any thoughts on how to do case insensitive string comparison using test command without converting to any particular case using typeset or tr? (8 Replies)
Discussion started by: Kulasekar
8 Replies
2. Shell Programming and Scripting
I am trying to get a script to print out whether a directory is lowercase uppercase or both. This is what I've got so far:
echo -e read "enter name"
read server
for DIR in $(find /tmp/$server -type d -prune | sed 's/\.\///g');do if expr match "$server" "*$" > /dev/null; then echo "$server -... (7 Replies)
Discussion started by: newbie2010
7 Replies
3. UNIX for Advanced & Expert Users
I want to locate directories that are upper, lower or have both upper and lower cases.
What I have is:
find /tmp/$var2 -type d' " ); && echo "host case is incorrect" || echo "host case is correct"
This actually is part of a larger script and it does work but the problem is that it... (3 Replies)
Discussion started by: newbie2010
3 Replies
4. Shell Programming and Scripting
Hi,
I have a Python unit test cases source code file which contains more than a hundred test case methods. In that, some of the test case methods already have prefix 'test' where as some of them do not have. Now, I need to add the string 'test' (case-sensitive) as a prefix to those of the... (5 Replies)
Discussion started by: royalibrahim
5 Replies
5. Shell Programming and Scripting
Hello,
I need help in creating a PERL script for parsing test result files to get the results (pass or fail). Each test case execution generates a directory with few files among which we are interested in .result file.
Lets say Testing is home directory. If i executed 2 test cases. It will... (4 Replies)
Discussion started by: ravi.videla
4 Replies
6. Shell Programming and Scripting
How to check weather a string is like test* or test* ot *test* in if condition (5 Replies)
Discussion started by: johnjerome
5 Replies
7. Shell Programming and Scripting
This is the code:
while test 1 -eq 1
do
read a
$a
if test $a = stop
then
break
fi
done
I read a command on every loop an execute it.
I check if the string equals the word stop to end the loop,but it say that I gave too many arguments to test.
For example echo hello.
Now the... (1 Reply)
Discussion started by: Max89
1 Replies
8. Linux
Hello ;
I have a problem running some script on dos .
when i run :
C: ls /temp
ls: cannot access /temp: No such file or directory
but when i run
C: ls \temp
windriver backup remotebackup
also when i run
C: ls temp
windriver backup remotebackup
The... (4 Replies)
Discussion started by: mulder20
4 Replies
9. Programming
How do I ignore the case in an if condition..?
EDIT: I put this in the wrong board...this is a linux script.
if
then
echo "Same name."
else
echo "Different name."
fi (1 Reply)
Discussion started by: Bandit390
1 Replies
10. UNIX for Dummies Questions & Answers
hi,
I am new to this forum and this is my first post. I am not too familiar with scripting so I will be spending a lot of time here.
I am trying to understand a ksh script.
NSCA=/bin/send_nsca
if ]
What does the -e check for? (3 Replies)
Discussion started by: fluke_perf
3 Replies
PROVE(1) Perl Programmers Reference Guide PROVE(1)
NAME
prove -- A command-line tool for running tests against Test::Harness
SYNOPSIS
prove [options] [files/directories]
OPTIONS
-b, --blib Adds blib/lib to the path for your tests, a la "use blib"
-d, --debug Includes extra debugging information
-D, --dry Dry run: Show the tests to run, but don't run them
-h, --help Display this help
-H, --man Longer manpage for prove
-I Add libraries to @INC, as Perl's -I
-l, --lib Add lib to the path for your tests
--perl Sets the name of the Perl executable to use
-r, --recurse Recursively descend into directories
-s, --shuffle Run the tests in a random order
--strap Define strap class to use
-T Enable tainting checks
-t Enable tainting warnings
--timer Print elapsed time after each test file
-v, --verbose Display standard output of test scripts while running them
-V, --version Display version info
Single-character options may be stacked. Default options may be set by specifying the PROVE_SWITCHES environment variable.
OVERVIEW
prove is a command-line interface to the test-running functionality of "Test::Harness". With no arguments, it will run all tests in the
current directory.
Shell metacharacters may be used with command lines options and will be exanded via "File::Glob::bsd_glob".
PROVE VS. "MAKE TEST"
prove has a number of advantages over "make test" when doing development.
* prove is designed as a development tool
Perl users typically run the test harness through a makefile via "make test". That's fine for module distributions, but it's subopti-
mal for a test/code/debug development cycle.
* prove is granular
prove lets your run against only the files you want to check. Running "prove t/live/ t/master.t" checks every *.t in t/live, plus
t/master.t.
* prove has an easy verbose mode
prove has a "-v" option to see the raw output from the tests. To do this with "make test", you must set "HARNESS_VERBOSE=1" in the
environment.
* prove can run under taint mode
prove's "-T" runs your tests under "perl -T", and "-t" runs them under "perl -t".
* prove can shuffle tests
You can use prove's "--shuffle" option to try to excite problems that don't show up when tests are run in the same order every time.
* prove doesn't rely on a make tool
Not everyone wants to write a makefile, or use ExtUtils::MakeMaker to do so. prove has no external dependencies.
* Not everything is a module
More and more users are using Perl's testing tools outside the context of a module distribution, and may not even use a makefile at
all.
COMMAND LINE OPTIONS
-b, --blib
Adds blib/lib to the path for your tests, a la "use blib".
-d, --debug
Include debug information about how prove is being run. This option doesn't show the output from the test scripts. That's handled by
-v,--verbose.
-D, --dry
Dry run: Show the tests to run, but don't run them.
-I
Add libraries to @INC, as Perl's -I.
-l, --lib
Add "lib" to @INC. Equivalent to "-Ilib".
--perl
Sets the "HARNESS_PERL" environment variable, which controls what Perl executable will run the tests.
-r, --recurse
Descends into subdirectories of any directories specified, looking for tests.
-s, --shuffle
Sometimes tests are accidentally dependent on tests that have been run before. This switch will shuffle the tests to be run prior to run-
ning them, thus ensuring that hidden dependencies in the test order are likely to be revealed. The author hopes the run the algorithm on
the preceding sentence to see if he can produce something slightly less awkward.
--strap
Sets the HARNESS_STRAP_CLASS variable to set which Test::Harness::Straps variable to use in running the tests.
-t
Runs test programs under perl's -t taint warning mode.
-T
Runs test programs under perl's -T taint mode.
--timer
Print elapsed time after each test file
-v, --verbose
Display standard output of test scripts while running them. Also sets TEST_VERBOSE in case your tests rely on them.
-V, --version
Display version info.
BUGS
Please use the CPAN bug ticketing system at <http://rt.cpan.org/>. You can also mail bugs, fixes and enhancements to "<bug-test-har-
ness@rt.cpan.org>".
TODO
o Shuffled tests must be recreatable
AUTHORS
Andy Lester "<andy at petdance.com>"
COPYRIGHT
Copyright 2004-2006 by Andy Lester "<andy at petdance.com>".
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See <http://www.perl.com/perl/misc/Artistic.html>.
perl v5.8.9 2009-04-13 PROVE(1)