which works as expected. Problem is that:
1) if it doesn't find any modules, i cant figure out with this particular command how to make it say [ok] insted of
[found hidden module]
diamorphine
2) if it doesnt find any modules, it doesn't return a new line. Which would be solved also if I could figure out 1) !
Moderator's Comments:
Please use code tags, for you code and data, thanks
Last edited by vbe; 05-02-2020 at 01:44 PM..
Reason: code tags
Hi,
I have a statement in shell script which i am writing below:
if ]
then
.....
What is the meaning of -a option in files, meaning of the statement in the if condition ] means.
Thanks (3 Replies)
can someone please tell me what is wrong with the below. i'm trying to get a script to run if the content of a variable is either small letter y or capital letter Y.
if
then
whatever
fi (4 Replies)
I want to write a program that would convert yard to feet and feet to yard.
i.e
1 yard = 3 * feet
Echo "enter a"
read a
expr a *3
The trick is that I want to give the user some options. After the conversion from yard to feet is done, I want to ask the user whether or not he/she wants to... (10 Replies)
In my ksh script, if the conditions of a if statement are true, then do nothing; otherwise, execute some commands.
How do I write the "do nothing" statement in the following example?
Example:
if (( "$x"="1" && "$y"="a" && "$z"="happy" ))
then
do nothing
else
command
command
fi... (3 Replies)
Hi All,
I am using Unix ksh script.
I need to insert values to a table using the o/p from a slelect statement.
Can anybody Help!
My script looks like tihs.
---`sqlplus -s username/password@SID << EOF
set heading off
set feedback off
set pages 0
insert into ${TB_NAME}_D... (2 Replies)
I have the program:
#!/bin/ksh
echo Please enter yes or no
read n
typeset -l n
if ]
then
echo My name
exit
else
echo delete my name
fi
Question:
How can I make the program accept only the word "yes" or "no" otherwise it will ask the user to re-enter?
Thanks! (7 Replies)
I'm trying to create a script that would allow me to identify the sucessful removal of a file. Here's what i put together so far, let me know if it's correct or not.
FILE_NAME="cactus.dat"
FILE_FIND='find / -name $FILE_NAME'
if ;then
echo "cactus.dat was not removed successfully" ... (3 Replies)
Hi,
I have this code here. Its suppose to do something when certain condition is met, I'm pretty sure at least one of the condition will be meet somewhere in the loop but it always go to else part of the script.
Is something wrong on this script?
age_list=`tar -tvf /home/dir/$tarfile... (4 Replies)
Hi folks,
I have a scenario to convert the update statements into insert statements using shell script (awk, sed...) or in database using regex.
I have a bunch of update statements with all columns in a file which I need to convert into insert statements.
UPDATE TABLE_A SET COL1=1 WHERE... (0 Replies)
Discussion started by: dev123
0 Replies
LEARN ABOUT DEBIAN
test::useallmodules
Test::UseAllModules(3pm) User Contributed Perl Documentation Test::UseAllModules(3pm)NAME
Test::UseAllModules - do use_ok() for all the MANIFESTed modules
SYNOPSIS
# basic usage
use strict;
use Test::UseAllModules;
BEGIN { all_uses_ok(); }
# if you also want to test modules under t/lib
use strict;
use Test::UseAllModules under => qw(lib t/lib);
BEGIN { all_uses_ok(); }
# if you have modules that'll fail use_ok() for themselves
use strict;
use Test::UseAllModules;
BEGIN {
all_uses_ok except => qw(
Some::Dependent::Module
Another::Dependent::Module
^Yet::Another::Dependent::.* # you can use regex
)
}
DESCRIPTION
I'm sick of writing 00_load.t (or something like that) that'll do use_ok() for every module I write. I'm sicker of updating 00_load.t when
I add another file to the distro. This module reads MANIFEST to find modules to be tested and does use_ok() for each of them. Now all you
have to do is update MANIFEST. You don't have to modify the test any more (hopefully).
EXPORTED FUNCTION
all_uses_ok
Does Test::More's use_ok() for every module found in MANIFEST. If you have modules you don't want to test, give those modules or some regex
rules as the argument. The word 'except' is ignored as shown above.
As of 0.11, you can also test modules under arbitrary directories by providing a directory list at the loading time (the word 'under' is
ignored as shown above). Modules under the lib directory are always tested.
PROTECTED FUNCTION
_get_module_list
Returns module paths to test. This function will not be exported. If you want to use this (see below), you always need to call it by the
full qualified name.
NOTES
As of 0.03, this module calls BAIL_OUT of Test::More if any of the use_ok tests should fail. (Thus the following tests will be ignored.
Missing or unloadable modules cause a lot of errors of the same kind.)
As of 0.12, you can add extra tests before/after all_uses_ok() if you explicitly declare test plan like this.
use strict;
use warnings;
use Test::More;
use Test::UseAllModules;
use Test::NoWarnings;
plan tests => Test::UseAllModules::_get_module_list() + 1;
all_uses_ok();
# and extra nowarnings test
SEE ALSO
There're several modules like this on the CPAN now. Test::Compile and a bit confusing Test::LoadAllModules try to find modules to test by
traversing directories. I'm not a big fun of them as they tend to find temporary or unrelated modules as well, but they may be handier
especially if you're too lazy to update MANIFEST every time.
AUTHOR
Kenichi Ishigaki, <ishigaki@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2006 by Kenichi Ishigaki
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.10.0 2009-05-27 Test::UseAllModules(3pm)