From 586a59e00d00f2b1347f015911545b722f2d1f8b Mon Sep 17 00:00:00 2001 From: Romain d'Alverny Date: Mon, 5 Dec 2011 22:55:33 +0000 Subject: 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/). --- t_install_iso/014_check_bad_words.t | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 t_install_iso/014_check_bad_words.t (limited to 't_install_iso/014_check_bad_words.t') 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(); -- cgit v1.2.1