diff --git a/tests/p_bc/10-bc-installed-test.sh b/tests/p_bc/10-bc-installed-test.sh new file mode 100755 index 0000000..9f622f8 --- /dev/null +++ b/tests/p_bc/10-bc-installed-test.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# Author : Varadharajan M +# Manoj Mahalingam + +t_Log "Running $0 - Test bc is installed" +bc --version +t_CheckExitStatus $? diff --git a/tests/p_bc/20-bc-test-simple-calculation.sh b/tests/p_bc/20-bc-test-simple-calculation.sh new file mode 100755 index 0000000..a80e46a --- /dev/null +++ b/tests/p_bc/20-bc-test-simple-calculation.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# Author : Varadharajan M +# Manoj Mahalingam + +t_Log "Running $0 - Testing basic bc functionalities" +test `echo "5 + 6 * 5 / 10 - 1" | bc` -eq "7" +t_CheckExitStatus $? diff --git a/tests/p_file/02_file_mime_image.sh b/tests/p_file/02_file_mime_image.sh index bae423e..4bd69b6 100755 --- a/tests/p_file/02_file_mime_image.sh +++ b/tests/p_file/02_file_mime_image.sh @@ -1,8 +1,10 @@ #!/bin/bash +# Author: ??? +# Christoph Galuschka t_Log "Running $0 - checking if file can recognize image mime file type " -file /usr/lib/anaconda-runtime/boot/syslinux-splash.png --mime-type | grep 'image/png' +file /usr/lib/anaconda-runtime/boot/syslinux-splash.png -i | grep -q 'image/png' t_CheckExitStatus $? diff --git a/tests/p_file/03_file_mime_symlink.sh b/tests/p_file/03_file_mime_symlink.sh index e8c3211..bf8badd 100755 --- a/tests/p_file/03_file_mime_symlink.sh +++ b/tests/p_file/03_file_mime_symlink.sh @@ -1,7 +1,16 @@ #!/bin/bash +# Author: ??? +# Christoph Galuschka t_Log "Running $0 - checking if file can recognize symlink mime file type " -file /etc/favicon.png --mime-type | grep 'application/x-symlink' +if (t_GetPkgRel basesystem | grep -q el5) + then + file -i /etc/grub.conf | grep -q 'x-not-regular-file' + ret_val=$? +else + file -i /etc/grub.conf | grep -q 'application/x-symlink' + ret_val=$? +fi -t_CheckExitStatus $? +t_CheckExitStatus $ret_val diff --git a/tests/p_ruby/20-ruby-version-test.sh b/tests/p_ruby/20-ruby-version-test.sh index 94bef97..0f5c30c 100755 --- a/tests/p_ruby/20-ruby-version-test.sh +++ b/tests/p_ruby/20-ruby-version-test.sh @@ -3,8 +3,18 @@ # Author: Sahil Muthoo # Author: Sahil Aggarwal # Author: Saager Mhatre +# Christoph Galuschka -t_Log "Running $0 - Check successful installation of ruby." -ruby -v | grep -q '1.8.7' -t_CheckExitStatus $? +t_Log "Running $0 - Check version of ruby." +v=$( ruby -v ) +if (t_GetPkgRel basesystem | grep -q el5) + then + ruby -v | grep -q '1.8.5' + ret_val=$? +else + ruby -v | grep -q '1.8.7' + ret_val=$? +fi + +t_CheckExitStatus $ret_val diff --git a/tests/p_ruby/30-irb-version-test.st b/tests/p_ruby/30-irb-version-test.st new file mode 100755 index 0000000..7b8bde2 --- /dev/null +++ b/tests/p_ruby/30-irb-version-test.st @@ -0,0 +1,20 @@ +#!/bin/sh +# Author: Nikhil Lanjewar +# Author: Sahil Muthoo +# Author: Sahil Aggarwal +# Author: Saager Mhatre +# Christoph Galuschka + +t_Log "Running $0 - Check version of irb." + +#allready prepared just in case versions should change between C5 and C6 +if (t_GetPkgRel basesystem | grep -q el5) + then + irb -v | grep -q '0.9.5' + ret_val=$? +else + irb -v | grep -q '0.9.5' + ret_val=$? +fi + +t_CheckExitStatus $ret_val diff --git a/tests/p_ruby/40-ri-version-test.sh b/tests/p_ruby/40-ri-version-test.sh new file mode 100755 index 0000000..ff0a1f1 --- /dev/null +++ b/tests/p_ruby/40-ri-version-test.sh @@ -0,0 +1,21 @@ +#!/bin/sh +# Author: Nikhil Lanjewar +# Author: Sahil Muthoo +# Author: Sahil Aggarwal +# Author: Saager Mhatre +# Christoph Galuschka + +t_Log "Running $0 - Check version of ruby ri." + +#allready prepared just in case versions should change between C5 and C6 +if (t_GetPkgRel basesystem | grep -q el5) + then + ri -v | grep -q '1.0.1' + ret_val=$? +else + ri -v | grep -q '1.0.1' + ret_val=$? +fi + +t_CheckExitStatus $ret_val + diff --git a/tests/p_ruby/50-rdoc-version-test.sh b/tests/p_ruby/50-rdoc-version-test.sh new file mode 100755 index 0000000..3bbdbaa --- /dev/null +++ b/tests/p_ruby/50-rdoc-version-test.sh @@ -0,0 +1,21 @@ +#!/bin/sh +# Author: Nikhil Lanjewar +# Author: Sahil Muthoo +# Author: Sahil Aggarwal +# Author: Saager Mhatre +# Christoph Galuschka + +t_Log "Running $0 - Check version of rdoc." + +#allready prepared just in case versions should change between C5 and C6 +if (t_GetPkgRel basesystem | grep -q el5) + then + rdoc -v | grep -q '1.0.1' + ret_val=$? +else + rdoc -v | grep -q '1.0.1' + ret_val=$? +fi + +t_CheckExitStatus $ret_val +