diff options
author | Romain d'Alverny <rda@mageia.org> | 2011-12-05 22:55:33 +0000 |
---|---|---|
committer | Romain d'Alverny <rda@mageia.org> | 2011-12-05 22:55:33 +0000 |
commit | 586a59e00d00f2b1347f015911545b722f2d1f8b (patch) | |
tree | 0410ef511a253d5f94298c7f130527a4672c230f /t_install_iso/014_check_bad_words.t | |
parent | 9412e3c3beb6d547f0932d4e1c19a9dfb0cd4378 (diff) | |
download | isocheck-586a59e00d00f2b1347f015911545b722f2d1f8b.tar isocheck-586a59e00d00f2b1347f015911545b722f2d1f8b.tar.gz isocheck-586a59e00d00f2b1347f015911545b722f2d1f8b.tar.bz2 isocheck-586a59e00d00f2b1347f015911545b722f2d1f8b.tar.xz isocheck-586a59e00d00f2b1347f015911545b722f2d1f8b.zip |
First import, test suite attempt for built ISOs
Code heavily taken from previous dams work,
reorganized in a test suite to better separate test cases.
Does basic things already (in t/).
Needs more fixes (esp. in t_install_iso/).
Diffstat (limited to 't_install_iso/014_check_bad_words.t')
-rw-r--r-- | t_install_iso/014_check_bad_words.t | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/t_install_iso/014_check_bad_words.t b/t_install_iso/014_check_bad_words.t new file mode 100644 index 0000000..88cf122 --- /dev/null +++ b/t_install_iso/014_check_bad_words.t @@ -0,0 +1,27 @@ +# +# This function search if there is any temporary files ( .file.swp and file~) +# or file with "bad" words. +# +use Test::Most tests => 2; + +bail_on_fail; + +# +my $res = `find /media/iso_check/ -name '*~' -or -iname '*.swp'`; +if ($res) { + fail('Has no swap temporary file (*~ or *.swp).'); + note $res; +} else { + pass('Has no swap temp file.'); +} + +# +$res = `find /media/iso_check/ -iname '*roxx*' -or -iname '*sucks*' -or -iname 'ubuntu*' -or -iname 'microsoft*' -or -iname 'mandrake*' -or -iname 'mandriva'`; +if ($res) { + fail('Has no blacklisted word.'); + note $res; +} else { + pass('Has no blacklisted word.'); +} + +done_testing(); |