aboutsummaryrefslogtreecommitdiffstats
path: root/t_install_iso/014_check_bad_words.t
diff options
context:
space:
mode:
Diffstat (limited to 't_install_iso/014_check_bad_words.t')
-rw-r--r--t_install_iso/014_check_bad_words.t21
1 files changed, 14 insertions, 7 deletions
diff --git a/t_install_iso/014_check_bad_words.t b/t_install_iso/014_check_bad_words.t
index 00a8c98..260f323 100644
--- a/t_install_iso/014_check_bad_words.t
+++ b/t_install_iso/014_check_bad_words.t
@@ -21,26 +21,33 @@
# This function search if there is any temporary files ( .file.swp and file~)
# or file with "bad" words.
#
-use Test::Most tests => 2;
+use Test::Most tests => 3;
-bail_on_fail;
+#bail_on_fail;
-#
+# check for temp/hidden files
my $res = `find /media/iso_check/ -name '*~' -or -iname '*.swp' -or -iname '.svn' -or -iname '.git*'`;
if ($res) {
fail('Has no swap temp or hiden RCS files (*~, *.swp, .svn or .git*).');
note $res;
} else {
- pass('Has no swap temp or hiden RDC files (*~, *.swp, .svn or .git*).');
+ pass('Has no swap temp or hiden RCS files (*~, *.swp, .svn or .git*).');
}
-#
+# check for bad words in file name or inside files
$res = `find /media/iso_check/ -iname '*roxx*' -or -iname '*sucks*' -or -iname 'ubuntu*' -or -iname 'microsoft*' -or -iname 'mandrake*' -or -iname 'mandriva' -or -iname 'todo' -or -iname 'delete*'`;
if ($res) {
- fail('Has no blacklisted words.');
+ fail('Has no blacklisted words in files names.');
note $res;
} else {
- pass('Has no blacklisted words.');
+ $res = `grep -c -r -l --exclude-dir=media --exclude-dir=dosutils --exclude=release* --exclude=pci.ids --exclude=memtest -i -e mandriva -e ubuntu -e roxx -e sucks -e microsoft -e mandrake -e trash -e delete /media/iso_check/`;
+ if ($res) {
+ fail('Has no blacklisted words inside files.');
+ note $res;
+ } else {
+ pass('Has no blacklisted words inside files.');
+ }
+ pass('Has no blacklisted words in files names.');
}
done_testing();